Documentation ¶
Overview ¶
Package storage is a generated GoMock package.
Index ¶
- func GetQueryTerminatorTagName(query string) []byte
- type DataOptions
- type FetchOptions
- type FetchResult
- type M3WrappedStorageOptions
- type MockStorage
- func (m *MockStorage) CompleteTags(arg0 context.Context, arg1 *storage0.CompleteTagsQuery, ...) (*consolidators.CompleteTagsResult, error)
- func (m *MockStorage) EXPECT() *MockStorageMockRecorder
- func (m *MockStorage) FetchByQuery(arg0 context0.Context, arg1 string, arg2 FetchOptions) (*FetchResult, error)
- type MockStorageMockRecorder
- type Storage
- type TranslatedQueryType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetQueryTerminatorTagName ¶
GetQueryTerminatorTagName will return the name for the terminator matcher in the given pattern. This is useful for filtering out any additional results.
Types ¶
type DataOptions ¶
type DataOptions struct { // Timeout determines a custom timeout for the context. If set to 0, uses // the default timeout. Timeout time.Duration }
DataOptions provide data context.
type FetchOptions ¶
type FetchOptions struct { // StartTime is the start time for the fetch. StartTime time.Time // EndTime is the end time for the fetch. EndTime time.Time // DataOptions are the options for the fetch. DataOptions // QueryFetchOpts are the query storage fetch options. QueryFetchOpts *querystorage.FetchOptions }
FetchOptions provides context to a fetch expression.
type FetchResult ¶
type FetchResult struct { // SeriesList is the aggregated list of results across all underlying storage // calls. SeriesList []*ts.Series // Metadata contains any additional metadata indicating information about // series execution. Metadata block.ResultMetadata }
FetchResult provides a fetch result and meta information.
func NewFetchResult ¶
func NewFetchResult( ctx context.Context, seriesList []*ts.Series, resultMeta block.ResultMetadata, ) *FetchResult
NewFetchResult is a convenience method for creating a FetchResult.
func (*FetchResult) Close ¶
func (fr *FetchResult) Close() error
Close will return the fetch result to the pool.
func (*FetchResult) Reset ¶
func (fr *FetchResult) Reset()
Reset will wipe out existing fetch result data.
type M3WrappedStorageOptions ¶ added in v0.15.16
type M3WrappedStorageOptions struct { AggregateNamespacesAllData bool ShiftTimeStart time.Duration ShiftTimeEnd time.Duration ShiftStepsStart int ShiftStepsEnd int ShiftStepsStartWhenAtResolutionBoundary *int ShiftStepsEndWhenAtResolutionBoundary *int ShiftStepsStartWhenEndAtResolutionBoundary *int ShiftStepsEndWhenStartAtResolutionBoundary *int RenderPartialStart bool RenderPartialEnd bool RenderSeriesAllNaNs bool CompileEscapeAllNotOnlyQuotes bool FindResultsIncludeBothExpandableAndLeaf bool }
M3WrappedStorageOptions is the graphite storage options.
type MockStorage ¶ added in v0.15.12
type MockStorage struct {
// contains filtered or unexported fields
}
MockStorage is a mock of Storage interface.
func NewMockStorage ¶ added in v0.15.12
func NewMockStorage(ctrl *gomock.Controller) *MockStorage
NewMockStorage creates a new mock instance.
func (*MockStorage) CompleteTags ¶ added in v1.2.0
func (m *MockStorage) CompleteTags(arg0 context.Context, arg1 *storage0.CompleteTagsQuery, arg2 *storage0.FetchOptions) (*consolidators.CompleteTagsResult, error)
CompleteTags mocks base method.
func (*MockStorage) EXPECT ¶ added in v0.15.12
func (m *MockStorage) EXPECT() *MockStorageMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockStorage) FetchByQuery ¶ added in v0.15.12
func (m *MockStorage) FetchByQuery(arg0 context0.Context, arg1 string, arg2 FetchOptions) (*FetchResult, error)
FetchByQuery mocks base method.
type MockStorageMockRecorder ¶ added in v0.15.12
type MockStorageMockRecorder struct {
// contains filtered or unexported fields
}
MockStorageMockRecorder is the mock recorder for MockStorage.
func (*MockStorageMockRecorder) CompleteTags ¶ added in v1.2.0
func (mr *MockStorageMockRecorder) CompleteTags(arg0, arg1, arg2 interface{}) *gomock.Call
CompleteTags indicates an expected call of CompleteTags.
func (*MockStorageMockRecorder) FetchByQuery ¶ added in v0.15.12
func (mr *MockStorageMockRecorder) FetchByQuery(arg0, arg1, arg2 interface{}) *gomock.Call
FetchByQuery indicates an expected call of FetchByQuery.
type Storage ¶
type Storage interface { // FetchByQuery fetches timeseries data based on a query. FetchByQuery( ctx context.Context, query string, opts FetchOptions, ) (*FetchResult, error) // CompleteTags fetches tag data based on a request. CompleteTags( ctx stdcontext.Context, query *querystorage.CompleteTagsQuery, opts *querystorage.FetchOptions, ) (*consolidators.CompleteTagsResult, error) }
Storage provides an interface for retrieving timeseries values or names based upon a query or path.
func NewM3WrappedStorage ¶
func NewM3WrappedStorage( m3storage storage.Storage, m3dbOpts m3.Options, instrumentOpts instrument.Options, opts M3WrappedStorageOptions, ) Storage
NewM3WrappedStorage creates a graphite storage wrapper around an m3query storage instance.
type TranslatedQueryType ¶ added in v1.2.0
type TranslatedQueryType uint
TranslatedQueryType describes a translated query type.
const ( // TerminatedTranslatedQuery is a query that is terminated at an explicit // leaf node (i.e. specific graphite path index number). TerminatedTranslatedQuery TranslatedQueryType = iota // StarStarUnterminatedTranslatedQuery is a query that is not terminated by // an explicit leaf node since it matches indefinite child nodes due to // a "**" in the query which matches indefinited child nodes. StarStarUnterminatedTranslatedQuery )
func TranslateQueryToMatchersWithTerminator ¶ added in v0.8.0
func TranslateQueryToMatchersWithTerminator( query string, ) (models.Matchers, TranslatedQueryType, error)
TranslateQueryToMatchersWithTerminator converts a graphite query to tag matcher pairs, and adds a terminator matcher to the end.