Documentation ¶
Overview ¶
Package publisher is used to batch and send metric data to CloudWatch
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Publisher ¶
type Publisher interface { // Publish publishes one or more metric data points Publish(metricDataPoints ...*cloudwatch.MetricDatum) // Start is to initiate the batch and publish operation Start(publishInterval int) // Stop is to terminate the batch and publish operation Stop() }
Publisher defines the interface to publish one or more data points
func New ¶
func New(ctx context.Context, region string, clusterID string, log logger.Logger) (Publisher, error)
Logic to fetch Region and CLUSTER_ID Case 1: Cx not using IRSA, we need to get region and clusterID using IMDS Case 2: Cx using IRSA but not specified clusterID, we can still get this info if IMDS is not blocked Case 3: Cx blocked IMDS access and not using IRSA (which means region == "") AND not specified clusterID then its a Cx error New returns a new instance of `Publisher`
Directories ¶
Path | Synopsis |
---|---|
Package mock_publisher is a generated GoMock package.
|
Package mock_publisher is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.