Documentation ¶
Index ¶
- type CloudWatchService
- func (c *CloudWatchService) GenerateBasicTelemetryMetrics(metricName string, value float64, version string) *cloudwatch.MetricDatum
- func (c *CloudWatchService) GenerateUpdateMetrics(metricName string, value float64, sourceVersion string, targetVersion string) *cloudwatch.MetricDatum
- func (c *CloudWatchService) IsCloudWatchEnabled() bool
- func (c *CloudWatchService) PutMetrics(metricData []*cloudwatch.MetricDatum) error
- type ICloudWatchService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudWatchService ¶
type CloudWatchService struct {
// contains filtered or unexported fields
}
CloudWatchService encapsulates the client and stop policy as a wrapper to call the CloudWatch API
func NewCloudWatchService ¶
func NewCloudWatchService(context context.T) *CloudWatchService
NewCloudWatchService Creates a new instance of the CloudWatchService
func (*CloudWatchService) GenerateBasicTelemetryMetrics ¶
func (c *CloudWatchService) GenerateBasicTelemetryMetrics(metricName string, value float64, version string) *cloudwatch.MetricDatum
GenerateBasicTelemetryMetrics generate metrics with instance id and AgentVersion as the dimension
func (*CloudWatchService) GenerateUpdateMetrics ¶
func (c *CloudWatchService) GenerateUpdateMetrics(metricName string, value float64, sourceVersion string, targetVersion string) *cloudwatch.MetricDatum
GenerateUpdateMetrics generate metrics with instance id, TargetVersion and SourceVersion as the dimension
func (*CloudWatchService) IsCloudWatchEnabled ¶
func (c *CloudWatchService) IsCloudWatchEnabled() bool
IsCloudWatchEnabled returns whether the agent telemetry to cloud watch is enabled or not
func (*CloudWatchService) PutMetrics ¶
func (c *CloudWatchService) PutMetrics(metricData []*cloudwatch.MetricDatum) error
PutMetrics publishes the metrics to CloudWatch
type ICloudWatchService ¶
type ICloudWatchService interface { GenerateUpdateMetrics(metricName string, value float64, sourceVersion string, targetVersion string) *cloudwatch.MetricDatum GenerateBasicTelemetryMetrics(metricName string, value float64, version string) *cloudwatch.MetricDatum PutMetrics(metricData []*cloudwatch.MetricDatum) error IsCloudWatchEnabled() bool }
ICloudWatchService is the interface to create and push cloud watch metrics
Click to show internal directories.
Click to hide internal directories.