class ClearcutUploader

Defined at line 53 of file ../../third_party/cobalt/src/lib/clearcut/uploader.h

A ClearcutUploader sends events to clearcut using the given HTTPClient.

Note: This class is not threadsafe.

Public Methods

void ClearcutUploader (std::string url, util::NotNullUniquePtr<HTTPClient> client, int64_t upload_timeout_millis, int64_t initial_backoff_millis, util::NotNullUniquePtr<cobalt::util::SteadyClockInterface> steady_clock, util::NotNullUniquePtr<cobalt::util::SleeperInterface> sleeper)

url: The URL of the Clearcut server to which POST requests should be sent.

client: An implementation of HTTPClient to use.

upload_timeout_millis: If a positive value is specified then this number of milliseconds

will be used as the HTTP request timeout. Otherwise no timeout will be used.

initial_backoff_millis: The initial value to use for exponential backoff, in milliseconds.

This is used when the ClearcutUploader retries on failures. Optionally override the default.

Mostly useful for tests.

steady_clock: Optionally replace the system steady clock. Mostly useful for tests.

sleeper: Optionally replace the system sleep. Mostly useful for tests.

Status UploadEvents (cobalt::clearcut_protos::LogRequest * log_request, int32_t max_retries)

Friends

class UploaderTest