Documentation ¶
Index ¶
- type AsyncSession
- func (s *AsyncSession) Aggregate(namespace ident.ID, q index.Query, opts index.AggregationOptions) (client.AggregatedTagsIterator, bool, error)
- func (s *AsyncSession) Close() error
- func (s *AsyncSession) Fetch(namespace, id ident.ID, startInclusive, endExclusive time.Time) (encoding.SeriesIterator, error)
- func (s *AsyncSession) FetchIDs(namespace ident.ID, ids ident.Iterator, startInclusive, endExclusive time.Time) (encoding.SeriesIterators, error)
- func (s *AsyncSession) FetchTagged(namespace ident.ID, q index.Query, opts index.QueryOptions) (results encoding.SeriesIterators, exhaustive bool, err error)
- func (s *AsyncSession) FetchTaggedIDs(namespace ident.ID, q index.Query, opts index.QueryOptions) (client.TaggedIDsIterator, bool, error)
- func (s *AsyncSession) IteratorPools() (encoding.IteratorPools, error)
- func (s *AsyncSession) ShardID(id ident.ID) (uint32, error)
- func (s *AsyncSession) Write(namespace, id ident.ID, t time.Time, value float64, unit xtime.Unit, ...) error
- func (s *AsyncSession) WriteTagged(namespace, id ident.ID, tags ident.TagIterator, t time.Time, value float64, ...) error
- type NewClientFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncSession ¶
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
func (s *AsyncSession) Aggregate(namespace ident.ID, q index.Query, opts index.AggregationOptions) (client.AggregatedTagsIterator, bool, error)
Aggregate aggregates values from the database for the given set of constraints.
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.