m3db

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsyncSession

type AsyncSession struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

AsyncSession is a thin wrapper around an M3DB session that does not block on initialization. Calls to methods while uninitialized will return an uninitialized error. The done channel is to notify the caller that the session has finished _attempting_ to get initialized.

func NewAsyncSession

func NewAsyncSession(fn NewClientFn, done chan<- struct{}) *AsyncSession

NewAsyncSession returns a new AsyncSession.

func (*AsyncSession) Aggregate added in v0.8.0

Aggregate aggregates values from the database for the given set of constraints.

func (*AsyncSession) Close

func (s *AsyncSession) Close() error

Close closes the session.

func (*AsyncSession) Fetch

func (s *AsyncSession) Fetch(namespace, id ident.ID, startInclusive,
	endExclusive time.Time) (encoding.SeriesIterator, error)

Fetch fetches values from the database for an ID.

func (*AsyncSession) FetchIDs

func (s *AsyncSession) FetchIDs(namespace ident.ID, ids ident.Iterator,
	startInclusive, endExclusive time.Time) (encoding.SeriesIterators, error)

FetchIDs fetches values from the database for a set of IDs.

func (*AsyncSession) FetchTagged

func (s *AsyncSession) FetchTagged(namespace ident.ID, q index.Query,
	opts index.QueryOptions) (results encoding.SeriesIterators,
	exhaustive bool, err error)

FetchTagged resolves the provided query to known IDs, and fetches the data for them.

func (*AsyncSession) FetchTaggedIDs

func (s *AsyncSession) FetchTaggedIDs(namespace ident.ID, q index.Query,
	opts index.QueryOptions) (client.TaggedIDsIterator, bool, error)

FetchTaggedIDs resolves the provided query to known IDs.

func (*AsyncSession) IteratorPools

func (s *AsyncSession) IteratorPools() (encoding.IteratorPools, error)

IteratorPools exposes the internal iterator pools used by the session to clients.

func (*AsyncSession) ShardID

func (s *AsyncSession) ShardID(id ident.ID) (uint32, error)

ShardID returns the given shard for an ID for callers to easily discern what shard is failing when operations for given IDs begin failing.

func (*AsyncSession) Write

func (s *AsyncSession) Write(namespace, id ident.ID, t time.Time, value float64,
	unit xtime.Unit, annotation []byte) error

Write writes a value to the database for an ID.

func (*AsyncSession) WriteTagged

func (s *AsyncSession) WriteTagged(namespace, id ident.ID, tags ident.TagIterator,
	t time.Time, value float64, unit xtime.Unit, annotation []byte) error

WriteTagged writes a value to the database for an ID and given tags.

type NewClientFn

type NewClientFn func() (client.Client, error)

NewClientFn provides a DB client.

Jump to

Keyboard shortcuts

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