Version: v1.5.0 Latest Latest

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

Go to latest
Published: Apr 7, 2022 License: Apache-2.0 Imports: 11 Imported by: 4




This section is empty.


This section is empty.


This section is empty.


type CallbackType

type CallbackType int

CallbackType defines the type for the callback.

const (
	// OnSuccess will mark the call as success.
	OnSuccess CallbackType = iota
	// OnNonRetriableError will mark the call as errored but not retriable.
	// OnRetriableError will mark the call as errored and should be retried.

Supported CallbackTypes.

type Callbackable added in v0.5.0

type Callbackable interface {
	Callback(t CallbackType)

Callbackable can be called back.

func NewProtobufCallback added in v0.5.0

func NewProtobufCallback(
	msg consumer.Message,
	dec *protobuf.AggregatedDecoder,
	wg *sync.WaitGroup,
) Callbackable

NewProtobufCallback creates a callbackable.

type Configuration

type Configuration struct {
	// Server configs the server.
	Server server.Configuration `yaml:"server"`

	// Handler configs the handler.
	Handler handlerConfiguration `yaml:"handler"`

	// Consumer configs the consumer.
	Consumer consumer.Configuration `yaml:"consumer"`

Configuration configs the m3msg server.

func (Configuration) NewServer

func (c Configuration) NewServer(
	writeFn WriteFn,
	rwOpts xio.Options,
	iOpts instrument.Options,
) (server.Server, error)

NewServer creates a new server.

type Options

type Options struct {
	InstrumentOptions          instrument.Options
	WriteFn                    WriteFn
	ProtobufDecoderPoolOptions pool.ObjectPoolOptions
	BlockholePolicies          []policy.StoragePolicy

Options for the ingest handler.

type WriteFn

type WriteFn func(
	ctx context.Context,
	id []byte,
	metricNanos, encodeNanos int64,
	value float64,
	annotation []byte,
	sp policy.StoragePolicy,
	callback Callbackable,

WriteFn is the function that writes a metric.

Jump to

Keyboard shortcuts

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