util

package
v0.0.0-...-c1b23f5 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseHostPort

func ParseHostPort(hp string) (host string, port int, err error)

func SparseFromBytes

func SparseFromBytes(b []byte) (*intsets.Sparse, error)

SparseFromBytes deserializes the given byte array into a Sparse object.

func SparseToBytes

func SparseToBytes(s *intsets.Sparse) ([]byte, error)

SparseToBytes serializes a Sparse object to a byte array.

func ToWriteRequest

func ToWriteRequest(items []BatchItem) (sampleCount int, data []byte, err error)

Types

type BatchItem

type BatchItem struct {
	Metric  model.Metric
	Samples []model.Sample
}

type Batcher

type Batcher struct {
	// contains filtered or unexported fields
}

func NewBatcher

func NewBatcher(maxCount int, maxWait time.Duration, outChan chan []BatchItem) *Batcher

func (*Batcher) Enqueue

func (b *Batcher) Enqueue(metric model.Metric, samples []model.Sample)

func (*Batcher) Start

func (b *Batcher) Start()

func (*Batcher) Stop

func (b *Batcher) Stop()

Jump to

Keyboard shortcuts

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