Documentation ¶
Index ¶
- type AsyncSession
- func (s *AsyncSession) Aggregate(ctx context.Context, namespace ident.ID, q index.Query, ...) (client.AggregatedTagsIterator, client.FetchResponseMetadata, error)
- func (s *AsyncSession) Close() error
- func (s *AsyncSession) Fetch(namespace, id ident.ID, startInclusive, endExclusive xtime.UnixNano) (encoding.SeriesIterator, error)
- func (s *AsyncSession) FetchIDs(namespace ident.ID, ids ident.Iterator, ...) (encoding.SeriesIterators, error)
- func (s *AsyncSession) FetchTagged(ctx context.Context, namespace ident.ID, q index.Query, ...) (encoding.SeriesIterators, client.FetchResponseMetadata, error)
- func (s *AsyncSession) FetchTaggedIDs(ctx context.Context, namespace ident.ID, q index.Query, ...) (client.TaggedIDsIterator, client.FetchResponseMetadata, error)
- func (s *AsyncSession) IteratorPools() (encoding.IteratorPools, error)
- func (s *AsyncSession) ReadClusterAvailability() (bool, error)
- func (s *AsyncSession) ShardID(id ident.ID) (uint32, error)
- func (s *AsyncSession) Write(namespace, id ident.ID, t xtime.UnixNano, value float64, unit xtime.Unit, ...) error
- func (s *AsyncSession) WriteClusterAvailability() (bool, error)
- func (s *AsyncSession) WriteTagged(namespace, id ident.ID, tags ident.TagIterator, t xtime.UnixNano, ...) 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( ctx context.Context, namespace ident.ID, q index.Query, opts index.AggregationOptions, ) (client.AggregatedTagsIterator, client.FetchResponseMetadata, 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 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 ¶
func (s *AsyncSession) FetchTagged( ctx context.Context, namespace ident.ID, q index.Query, opts index.QueryOptions, ) (encoding.SeriesIterators, client.FetchResponseMetadata, error)
FetchTagged resolves the provided query to known IDs, and fetches the data for them.
func (*AsyncSession) FetchTaggedIDs ¶
func (s *AsyncSession) FetchTaggedIDs( ctx context.Context, namespace ident.ID, q index.Query, opts index.QueryOptions, ) (client.TaggedIDsIterator, client.FetchResponseMetadata, 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) 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.