publisher

package
v1.13.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL