Documentation ¶
Index ¶
- func FromRPCAggregateQueryRawRequest(req *rpc.AggregateQueryRawRequest, pools FetchTaggedConversionPools) (ident.ID, index.Query, index.AggregationOptions, error)
- func FromRPCAggregateQueryRequest(req *rpc.AggregateQueryRequest) (ident.ID, index.Query, index.AggregationOptions, error)
- func FromRPCFetchTaggedRequest(req *rpc.FetchTaggedRequest, pools FetchTaggedConversionPools) (ident.ID, index.Query, index.QueryOptions, bool, error)
- func FromRPCQuery(query *rpc.Query) (idx.Query, error)
- func ToDuration(timeType rpc.TimeType) (time.Duration, error)
- func ToRPCAggregateQueryRawRequest(ns ident.ID, q index.Query, opts index.AggregationOptions) (rpc.AggregateQueryRawRequest, error)
- func ToRPCError(err error) *rpc.Error
- func ToRPCFetchTaggedRequest(ns ident.ID, q index.Query, opts index.QueryOptions, fetchData bool) (rpc.FetchTaggedRequest, error)
- func ToTagsIter(r *rpc.WriteTaggedRequest) (ident.TagIterator, error)
- func ToTime(value int64, timeType rpc.TimeType) (xtime.UnixNano, error)
- func ToTimeType(unit xtime.Unit) (rpc.TimeType, error)
- func ToUnit(timeType rpc.TimeType) (xtime.Unit, error)
- func ToValue(t xtime.UnixNano, timeType rpc.TimeType) (int64, error)
- type FetchTaggedConversionPools
- type ToSegmentsResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromRPCAggregateQueryRawRequest ¶ added in v0.8.0
func FromRPCAggregateQueryRawRequest( req *rpc.AggregateQueryRawRequest, pools FetchTaggedConversionPools, ) (ident.ID, index.Query, index.AggregationOptions, error)
FromRPCAggregateQueryRawRequest converts the rpc request type for AggregateRawQueryRequest into corresponding Go API types.
func FromRPCAggregateQueryRequest ¶ added in v0.8.0
func FromRPCAggregateQueryRequest( req *rpc.AggregateQueryRequest, ) (ident.ID, index.Query, index.AggregationOptions, error)
FromRPCAggregateQueryRequest converts the rpc request type for AggregateRawQueryRequest into corresponding Go API types.
func FromRPCFetchTaggedRequest ¶
func FromRPCFetchTaggedRequest( req *rpc.FetchTaggedRequest, pools FetchTaggedConversionPools, ) (ident.ID, index.Query, index.QueryOptions, bool, error)
FromRPCFetchTaggedRequest converts the rpc request type for FetchTaggedRequest into corresponding Go API types.
func FromRPCQuery ¶
FromRPCQuery will create a m3ninx index query from an RPC query. NB: a nil query is considered equivalent to an `All` query.
func ToDuration ¶
ToDuration converts a time type to a duration.
func ToRPCAggregateQueryRawRequest ¶ added in v0.8.0
func ToRPCAggregateQueryRawRequest( ns ident.ID, q index.Query, opts index.AggregationOptions, ) (rpc.AggregateQueryRawRequest, error)
ToRPCAggregateQueryRawRequest converts the Go `client/` types into rpc request type for AggregateQueryRawRequest.
func ToRPCError ¶
ToRPCError converts a server error to a RPC error.
func ToRPCFetchTaggedRequest ¶
func ToRPCFetchTaggedRequest( ns ident.ID, q index.Query, opts index.QueryOptions, fetchData bool, ) (rpc.FetchTaggedRequest, error)
ToRPCFetchTaggedRequest converts the Go `client/` types into rpc request type for FetchTaggedRequest.
func ToTagsIter ¶
func ToTagsIter(r *rpc.WriteTaggedRequest) (ident.TagIterator, error)
ToTagsIter returns a tag iterator over the given request.
func ToTimeType ¶
ToTimeType converts a unit to a time type
Types ¶
type FetchTaggedConversionPools ¶
type FetchTaggedConversionPools interface { // ID returns an ident.Pool ID() ident.Pool // CheckedBytesWrapperPool returns a CheckedBytesWrapperPool. CheckedBytesWrapper() xpool.CheckedBytesWrapperPool }
FetchTaggedConversionPools allows users to pass a pool for conversions.
type ToSegmentsResult ¶
ToSegmentsResult is the result of a convert to segments call, if the segments were merged then checksum is ptr to the checksum otherwise it is nil.
func ToSegments ¶
func ToSegments(ctx context.Context, blocks []xio.BlockReader) (ToSegmentsResult, error)
ToSegments converts a list of blocks to segments.