Versions in this module Expand all Collapse all v0 v0.0.2 Jun 9, 2023 v0.0.1 Jun 6, 2023 Changes in this version + type Agent interface + Flush func() error + Start func() error + Stop func() error + func New(endpoint string, opts ...Option) (Agent, error) + type Input interface + Close func() error + Gather func() ([]*types.Sample, error) + GetInterval func() time.Duration + Init func() error + Prefix func() string + String func() string + type Option func(o *Options) + func WithInput(inputs ...Input) Option + func WithOutput(output Output) Option + func WithOutputDebug(v bool) Option + func WithReaderBatchSize(batchSize int) Option + func WithReaderInterval(interval time.Duration) Option + func WithReaderOutputInterval(interval time.Duration) Option + func WithReaderQueueSize(queueSize int) Option + func WithReaderTags(tags map[string]string) Option + type Options struct + Debug bool + Inputs []Input + Output Output + ReaderOptions ReaderOptions + type Output interface + Write func(ctx context.Context, items []*types.Sample) error + func NewOutput(remote RemoteWriter, opts ...OutputOption) Output + type OutputOption func(o *OutputOptions) + func WithDebug(v bool) OutputOption + func WithTimeout(timeout time.Duration) OutputOption + type OutputOptions struct + Debug bool + RemoteWriter RemoteWriter + Timeout time.Duration + type Reader interface + Flush func() error + Init func(input Input, output Output) error + Start func() error + Stop func() error + String func() string + func NewReader(opts ...ReaderOption) Reader + type ReaderOption func(o *ReaderOptions) + func WithBatchSize(batchSize int) ReaderOption + func WithInterval(interval time.Duration) ReaderOption + func WithOutputInterval(interval time.Duration) ReaderOption + func WithQueueSize(queueSize int) ReaderOption + func WithTags(tags map[string]string) ReaderOption + type ReaderOptions struct + BatchSize int + Interval time.Duration + OutputInterval time.Duration + QueueSize int + Tags map[string]string + type RemoteWriter interface + Write func(ctx context.Context, items []prompb.TimeSeries) error + func NewRemoteWriter(endpoint string, opts ...RemoteWriterOption) (RemoteWriter, error) + type RemoteWriterOption func(o *RemoteWriterOptions) + func WithBasicPassword(basicPassword string) RemoteWriterOption + func WithBasicUsername(username string) RemoteWriterOption + func WithDialTimeout(dialTimeout time.Duration) RemoteWriterOption + func WithMaxIdleConnsPerHost(v int) RemoteWriterOption + func WithResponseHeaderTimeout(timeout time.Duration) RemoteWriterOption + type RemoteWriterOptions struct + BasicPassword string + BasicUsername string + DialTimeout time.Duration + Endpoint string + MaxIdleConnsPerHost int + ResponseHeaderTimeout time.Duration