bufmetrics

package
v0.1.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2021 License: CC0-1.0, CC0-1.0, CC0-1.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

type Buffer interface {
	io.Closer
	metrics.Interface
	log.Logable
}

Buffer is a metrics.Interface backed by a buffer.

func New

func New(m metrics.Interface, size int, flushInterval time.Duration, flushTimeout time.Duration) (Buffer, error)

New returns a new buffer wrapping m, with given buffer size, flush interval (how frequently the buffer is automatically submitted to m), and flush timeout (how long before a submission attempt to m is determined to have timed out). It is important that the user call Close on the returned buffer, otherwise unflushed metric data will be lost.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL