blob: a1c3d558c62b43a9591c03e08b7db05e1a365859 [file] [log] [blame]
// Interface for a DataSinkService client.
#ifndef PLATFORMS_SYSHEALTH_COLLECTION_FEED_FORWARD_CLIENT_LIB_FEED_CLIENT_INTERFACE_H_
#define PLATFORMS_SYSHEALTH_COLLECTION_FEED_FORWARD_CLIENT_LIB_FEED_CLIENT_INTERFACE_H_
#include "tlbmc/agent_config_service.pb.h"
#include "tlbmc/data_sink_service.pb.h"
#include "absl/status/statusor.h"
#include "absl/strings/string_view.h"
namespace platforms_syshealth::collection::feed {
class FeedClientInterface {
public:
virtual ~FeedClientInterface() = default;
// Writes metrics to the DataSinkService.
virtual absl::StatusOr<WriteMetricsResponse> WriteMetrics(
const WriteMetricsRequest& request) = 0;
// Gets policies from the AgentConfigService.
virtual absl::StatusOr<GetPoliciesResponse> GetPolicies(
const GetPoliciesRequest& request) = 0;
// Sets target address for the client. If not set during construction,
// client will be in dry run mode.
virtual void SetTargetAddress(absl::string_view target_address) = 0;
// Returns true if the client is in dry run mode.
virtual bool IsDryRun() const = 0;
};
} // namespace platforms_syshealth::collection::feed
#endif // PLATFORMS_SYSHEALTH_COLLECTION_FEED_FORWARD_CLIENT_LIB_FEED_CLIENT_INTERFACE_H_