Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBufferFull = errors.New("unable to send more datapoints. Buffer full")
ErrBufferFull is returned by BufferedForwarder.AddDatapoints if the sink's buffer is full
Functions ¶
This section is empty.
Types ¶
type BufferedForwarder ¶
type BufferedForwarder struct {
// contains filtered or unexported fields
}
BufferedForwarder abstracts out datapoint buffering. Points put on its channel are buffered and sent in large groups to a waiting sink
func NewBufferedForwarder ¶
func NewBufferedForwarder(ctx context.Context, config Config, sendTo dpsink.Sink) *BufferedForwarder
NewBufferedForwarder is used only by this package to create a forwarder that buffers its datapoint channel
func (*BufferedForwarder) AddDatapoints ¶
func (forwarder *BufferedForwarder) AddDatapoints(ctx context.Context, points []*datapoint.Datapoint) error
AddDatapoints sends the datapoints to a chan buffer that eventually is flushed in big groups
func (*BufferedForwarder) Close ¶
func (forwarder *BufferedForwarder) Close()
Close stops the threads that are flushing channel points to the next forwarder
Click to show internal directories.
Click to hide internal directories.