m3db

package
v1.5.0 Latest Latest
Warning

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

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

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 xtime.UnixNano) (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 xtime.UnixNano) (encoding.SeriesIterators, error)

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

func (*AsyncSession) FetchTagged

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

func (*AsyncSession) FetchTaggedIDs

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) ReadClusterAvailability added in v1.0.1

func (s *AsyncSession) ReadClusterAvailability() (bool, error)

ReadClusterAvailability returns whether the cluster is availabile for reads.

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 xtime.UnixNano, value float64,
	unit xtime.Unit, annotation []byte) error

Write writes a value to the database for an ID.

func (*AsyncSession) WriteClusterAvailability added in v1.0.1

func (s *AsyncSession) WriteClusterAvailability() (bool, error)

WriteClusterAvailability returns whether the cluster is availabile for writes.

func (*AsyncSession) WriteTagged

func (s *AsyncSession) WriteTagged(namespace, id ident.ID, tags ident.TagIterator,
	t xtime.UnixNano, 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