# Functions
LinearBackoff returns a BackoffFunc which when called returns attempt * scale.
New constructs a point writer with an underlying buffer from the provided BucketMetricWriter The writer will flushed metrics to the underlying BucketMetricWriter when the buffer is full or the configured flush interval ellapses without a flush occuring.
NewBucketWriter allocates, configures and returned a new BucketWriter for writing metrics to a specific organisations bucket.
NewBufferedWriter returns a new *BufferedWriter with the default buffer size.
NewBufferedWriterSize returns a new *BufferedWriter with a buffer allocated with the provided size.
NewPointWriter configures and returns a *PointWriter writer type The new writer will automatically begin scheduling periodic flushes based on the provided duration.
NewRetryWriter returns a configured *RetryWriter which decorates the supplied MetricsWriter.
WithBackoff sets of the BackoffFunc on the RetryWriter.
WithBufferSize sets the size of the underlying buffer on the point writer.
WithContext sets the context.Context used for each flush.
WithFlushInterval sets the flush interval on the writer The point writer will wait at least this long between flushes of the undeyling buffered writer.
WithMaxAttempts sets the maximum number of attempts for a Write operation attempt.
WithRetries configures automatic retry behavior on specific transient error conditions when attempting to Write metrics to a client.
WithRetrySleepLimit sets the retry sleep limit.
# Structs
BucketWriter writes metrics to a particular bucket within a particular organisation.
BufferedWriter is a buffered implementation of the MetricsWriter interface It is unashamedly derived from the bufio pkg https://golang.org/pkg/bufio Metrics are buffered up until the buffer size is met and then flushed to an underlying MetricsWriter The writer can also be flushed manually by calling Flush BufferedWriter is not safe to be called concurrently and therefore concurrency should be managed by the caller.
Config is a structure used to configure a point writer.
PointWriter delegates calls to Write to an underlying flushing writer implementation.
RetryWriter is a metrics writers which decorates other metrics writer implementations and automatically retries attempts to write metrics under certain error conditions.
# Interfaces
BucketMetricWriter is a type which Metrics can be written to a particular bucket in a particular organisation.
MetricsWriteFlush is a type of metrics writer which is buffered and metrics can be flushed to.
MetricsWriter is a type which metrics can be written to.
# Type aliases
BackoffFunc is a function which when called with an attempt number returns a duration which should be waited for until a subsequent attempt is made.
Option is a functional option for Configuring point writers.
Options is a slice of Option.
RetryOption is a functional option for the RetryWriters type.