Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { // BackendName returns the name of the backend. BackendName() string // SampleConfig returns the sample config for the backend. SampleConfig() string // SendMetricsAsync flushes the metrics to the backend, preparing payload synchronously but doing the send asynchronously. // Must not read/write MetricMap asynchronously. SendMetricsAsync(context.Context, *types.MetricMap, SendCallback) // SendEvent sends event to the backend. SendEvent(context.Context, *types.Event) error }
Backend represents a backend.
type RunnableBackend ¶
type RunnableBackend interface { Backend // Run executes backend send operations. Should be started in a goroutine. Run(context.Context) error }
RunnableBackend represents a backend that needs a Run method to be executed to work.
type SendCallback ¶
type SendCallback func([]error)
SendCallback is called by Backend.SendMetricsAsync() to notify about the result of operation. A list of errors is passed to the callback. It may be empty or contain nil values. Every non-nil value is an error that happened while sending metrics.
Click to show internal directories.
Click to hide internal directories.