18 #include <aws/core/Aws.h> 19 #include <aws/logs/CloudWatchLogsClient.h> 35 namespace CloudWatchLogs {
64 LogPublisher(
const std::string & log_group,
const std::string & log_stream,
65 const Aws::Client::ClientConfiguration & client_config);
75 LogPublisher(
const std::string & log_group,
const std::string & log_stream,
76 std::shared_ptr<Aws::CloudWatchLogs::Utils::CloudWatchLogsFacade> cw_client);
93 bool start()
override;
133 mutable std::recursive_mutex
mtx_;
LogPublisherRunState getRunState()
LogPublisher & operator=(const LogPublisher &other)=delete
bool checkIfConnected(Aws::CloudWatchLogs::ROSCloudWatchLogsErrors error)
Aws::SDKOptions aws_sdk_options_
Aws::DataFlow::UploadStatus publishData(std::list< Aws::CloudWatchLogs::Model::InputLogEvent > &data) override
Aws::CloudWatchLogs::ROSCloudWatchLogsErrors SendLogs(Aws::String &next_token, std::list< Aws::CloudWatchLogs::Model::InputLogEvent > &data)
ObservableObject< LogPublisherRunState > run_state_
std::recursive_mutex mtx_
bool InitToken(Aws::String &next_token)
Aws::Client::ClientConfiguration client_config_
static const Aws::String UNINITIALIZED_TOKEN
std::shared_ptr< Aws::CloudWatchLogs::Utils::CloudWatchLogsFacade > cloudwatch_facade_
LogPublisher(const std::string &log_group, const std::string &log_stream, const Aws::Client::ClientConfiguration &client_config)
Creates a LogPublisher object that uses the provided client and SDK configuration Constructs a LogPub...
LogPublisherRunState
Defines the different runtime states for the Publisher This enum is used by the LogPublisher to track...
~LogPublisher() override
Tears down the LogPublisher object.
ROSCloudWatchLogsErrors
Defines error return codes for functions This enum defines standard error codes that will be returned...