Documentation
¶
Index ¶
Constants ¶
View Source
const MaxPayloadSize = 1_000_000 // 1MB in bytes
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
SendMetric(name string, metricType string, value float64, additionalTags map[string]string) error
}
MetricsClient defines the interface for a metrics collector client.
type CollectorClient ¶
type CollectorClient struct {
APIClient apiclient.ClientInterface
APIEndpoint string
DefaultTags map[string]string
JobID string
MetricsBuffer []map[string]interface{}
BufferMutex sync.Mutex
MaxBufferSize int
FlushTicker *time.Ticker
// contains filtered or unexported fields
}
func New ¶
func New(envSettings config.ProxyEnvSettings, apiClient apiclient.ClientInterface) *CollectorClient
Returns the instance of CollectorClient
func (*CollectorClient) SendMetric ¶
func (*CollectorClient) StopBatchProcess ¶
func (c *CollectorClient) StopBatchProcess()
Method to stop the batch process
Click to show internal directories.
Click to hide internal directories.