Documentation ¶
Overview ¶
Package m3 is a generated GoMock package.
Index ¶
- func FetchResultToBlockResult(result SeriesFetchResult, query *storage.FetchQuery, ...) (block.Result, error)
- type AggregatedClusterNamespaceDefinition
- type Cleanup
- type ClusterNamespace
- type ClusterNamespaceDownsampleOptions
- type ClusterNamespaceOptions
- type ClusterNamespaces
- type ClusterNamespacesByResolutionAsc
- type ClusterNamespacesByRetentionAsc
- type ClusterStaticConfiguration
- type ClusterStaticNamespaceConfiguration
- type Clusters
- type ClustersStaticConfiguration
- type ClustersStaticConfigurationOptions
- type DownsampleClusterStaticNamespaceConfiguration
- type MockStorage
- func (m *MockStorage) Close() error
- func (m *MockStorage) CompleteTags(arg0 context.Context, arg1 *storage.CompleteTagsQuery, ...) (*storage.CompleteTagsResult, error)
- func (m *MockStorage) CompleteTagsCompressed(arg0 context.Context, arg1 *storage.CompleteTagsQuery, ...) (*storage.CompleteTagsResult, error)
- func (m *MockStorage) EXPECT() *MockStorageMockRecorder
- func (m *MockStorage) ErrorBehavior() storage.ErrorBehavior
- func (m *MockStorage) FetchBlocks(arg0 context.Context, arg1 *storage.FetchQuery, arg2 *storage.FetchOptions) (block.Result, error)
- func (m *MockStorage) FetchCompressed(arg0 context.Context, arg1 *storage.FetchQuery, arg2 *storage.FetchOptions) (SeriesFetchResult, Cleanup, error)
- func (m *MockStorage) FetchProm(arg0 context.Context, arg1 *storage.FetchQuery, arg2 *storage.FetchOptions) (storage.PromResult, error)
- func (m *MockStorage) Name() string
- func (m *MockStorage) SearchCompressed(arg0 context.Context, arg1 *storage.FetchQuery, arg2 *storage.FetchOptions) (TagResult, Cleanup, error)
- func (m *MockStorage) SearchSeries(arg0 context.Context, arg1 *storage.FetchQuery, arg2 *storage.FetchOptions) (*storage.SearchResults, error)
- func (m *MockStorage) Type() storage.Type
- func (m *MockStorage) Write(arg0 context.Context, arg1 *storage.WriteQuery) error
- type MockStorageMockRecorder
- func (mr *MockStorageMockRecorder) Close() *gomock.Call
- func (mr *MockStorageMockRecorder) CompleteTags(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockStorageMockRecorder) CompleteTagsCompressed(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockStorageMockRecorder) ErrorBehavior() *gomock.Call
- func (mr *MockStorageMockRecorder) FetchBlocks(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockStorageMockRecorder) FetchCompressed(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockStorageMockRecorder) FetchProm(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockStorageMockRecorder) Name() *gomock.Call
- func (mr *MockStorageMockRecorder) SearchCompressed(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockStorageMockRecorder) SearchSeries(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockStorageMockRecorder) Type() *gomock.Call
- func (mr *MockStorageMockRecorder) Write(arg0, arg1 interface{}) *gomock.Call
- type MultiFetchResult
- type MultiFetchTagsResult
- type MultiTagResult
- type NewClientFromConfig
- type Querier
- type RetentionResolution
- type SeriesFetchResult
- type Storage
- type TagResult
- type UnaggregatedClusterNamespaceDefinition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchResultToBlockResult ¶ added in v0.15.0
func FetchResultToBlockResult( result SeriesFetchResult, query *storage.FetchQuery, options *storage.FetchOptions, opts m3db.Options, ) (block.Result, error)
FetchResultToBlockResult converts an encoded SeriesIterator fetch result into blocks.
Types ¶
type AggregatedClusterNamespaceDefinition ¶
type AggregatedClusterNamespaceDefinition struct { NamespaceID ident.ID Session client.Session Retention time.Duration Resolution time.Duration Downsample *ClusterNamespaceDownsampleOptions }
AggregatedClusterNamespaceDefinition is a definition for a cluster namespace that holds aggregated metrics data at a specific retention and resolution.
func (AggregatedClusterNamespaceDefinition) Validate ¶
func (def AggregatedClusterNamespaceDefinition) Validate() error
Validate validates the cluster namespace definition.
type Cleanup ¶
type Cleanup func() error
Cleanup is a cleanup function to be called after resources are freed.
type ClusterNamespace ¶
type ClusterNamespace interface { NamespaceID() ident.ID Options() ClusterNamespaceOptions Session() client.Session }
ClusterNamespace is a local storage cluster namespace.
type ClusterNamespaceDownsampleOptions ¶
type ClusterNamespaceDownsampleOptions struct {
All bool
}
ClusterNamespaceDownsampleOptions is the downsample options for a cluster namespace.
type ClusterNamespaceOptions ¶
type ClusterNamespaceOptions struct {
// contains filtered or unexported fields
}
ClusterNamespaceOptions is a set of options
func (ClusterNamespaceOptions) Attributes ¶
func (o ClusterNamespaceOptions) Attributes() storage.Attributes
Attributes returns the storage attributes of the cluster namespace.
func (ClusterNamespaceOptions) DownsampleOptions ¶
func (o ClusterNamespaceOptions) DownsampleOptions() ( ClusterNamespaceDownsampleOptions, error, )
DownsampleOptions returns the downsample options for a cluster namespace, which is only valid if the namespace is an aggregated cluster namespace.
type ClusterNamespaces ¶
type ClusterNamespaces []ClusterNamespace
ClusterNamespaces is a slice of ClusterNamespace instances.
func (ClusterNamespaces) NumAggregatedClusterNamespaces ¶
func (n ClusterNamespaces) NumAggregatedClusterNamespaces() int
NumAggregatedClusterNamespaces returns the number of aggregated cluster namespaces.
type ClusterNamespacesByResolutionAsc ¶ added in v0.4.6
type ClusterNamespacesByResolutionAsc []ClusterNamespace
ClusterNamespacesByResolutionAsc is a slice of ClusterNamespace instances is sortable by resolution.
func (ClusterNamespacesByResolutionAsc) Len ¶ added in v0.4.6
func (a ClusterNamespacesByResolutionAsc) Len() int
func (ClusterNamespacesByResolutionAsc) Less ¶ added in v0.4.6
func (a ClusterNamespacesByResolutionAsc) Less(i, j int) bool
func (ClusterNamespacesByResolutionAsc) Swap ¶ added in v0.4.6
func (a ClusterNamespacesByResolutionAsc) Swap(i, j int)
type ClusterNamespacesByRetentionAsc ¶ added in v0.4.6
type ClusterNamespacesByRetentionAsc []ClusterNamespace
ClusterNamespacesByRetentionAsc is a slice of ClusterNamespace instances is sortable by retention.
func (ClusterNamespacesByRetentionAsc) Len ¶ added in v0.4.6
func (a ClusterNamespacesByRetentionAsc) Len() int
func (ClusterNamespacesByRetentionAsc) Less ¶ added in v0.4.6
func (a ClusterNamespacesByRetentionAsc) Less(i, j int) bool
func (ClusterNamespacesByRetentionAsc) Swap ¶ added in v0.4.6
func (a ClusterNamespacesByRetentionAsc) Swap(i, j int)
type ClusterStaticConfiguration ¶
type ClusterStaticConfiguration struct { NewClientFromConfig NewClientFromConfig Namespaces []ClusterStaticNamespaceConfiguration `yaml:"namespaces"` Client client.Configuration `yaml:"client"` }
ClusterStaticConfiguration is a static cluster configuration.
type ClusterStaticNamespaceConfiguration ¶
type ClusterStaticNamespaceConfiguration struct { // Namespace is namespace in the cluster that is specified. Namespace string `yaml:"namespace"` // Type is the type of values stored by the namespace, current // supported values are "unaggregated" or "aggregated". Type storage.MetricsType `yaml:"type"` // Retention is the length of which values are stored by the namespace. Retention time.Duration `yaml:"retention" validate:"nonzero"` // Resolution is the frequency of which values are stored by the namespace. Resolution time.Duration `yaml:"resolution" validate:"min=0"` // Downsample is the configuration for downsampling options to use with // the namespace. Downsample *DownsampleClusterStaticNamespaceConfiguration `yaml:"downsample"` // StorageMetricsType is the namespace type. // // Deprecated: Use "Type" field when specifying config instead, it is // invalid to use both. StorageMetricsType storage.MetricsType `yaml:"storageMetricsType"` }
ClusterStaticNamespaceConfiguration describes the namespaces in a static cluster.
type Clusters ¶
type Clusters interface { io.Closer // ClusterNamespaces returns all known cluster namespaces. ClusterNamespaces() ClusterNamespaces // UnaggregatedClusterNamespace returns the valid unaggregated // cluster namespace. UnaggregatedClusterNamespace() ClusterNamespace // AggregatedClusterNamespace returns an aggregated cluster namespace // at a specific retention and resolution. AggregatedClusterNamespace(attrs RetentionResolution) (ClusterNamespace, bool) }
Clusters is a flattened collection of local storage clusters and namespaces.
func NewClusters ¶
func NewClusters( unaggregatedClusterNamespace UnaggregatedClusterNamespaceDefinition, aggregatedClusterNamespaces ...AggregatedClusterNamespaceDefinition, ) (Clusters, error)
NewClusters instantiates a new Clusters instance.
type ClustersStaticConfiguration ¶
type ClustersStaticConfiguration []ClusterStaticConfiguration
ClustersStaticConfiguration is a set of static cluster configurations.
func (ClustersStaticConfiguration) NewClusters ¶
func (c ClustersStaticConfiguration) NewClusters( instrumentOpts instrument.Options, opts ClustersStaticConfigurationOptions, ) (Clusters, error)
NewClusters instantiates a new Clusters instance.
type ClustersStaticConfigurationOptions ¶
type ClustersStaticConfigurationOptions struct { AsyncSessions bool ProvidedSession client.Session CustomAdminOptions []client.CustomAdminOption }
ClustersStaticConfigurationOptions are options to use when constructing clusters from config.
type DownsampleClusterStaticNamespaceConfiguration ¶
type DownsampleClusterStaticNamespaceConfiguration struct {
All bool `yaml:"all"`
}
DownsampleClusterStaticNamespaceConfiguration is configuration specified for downsampling options on an aggregated cluster namespace.
type MockStorage ¶ added in v0.9.2
type MockStorage struct {
// contains filtered or unexported fields
}
MockStorage is a mock of Storage interface
func NewMockStorage ¶ added in v0.9.2
func NewMockStorage(ctrl *gomock.Controller) *MockStorage
NewMockStorage creates a new mock instance
func (*MockStorage) Close ¶ added in v0.9.2
func (m *MockStorage) Close() error
Close mocks base method
func (*MockStorage) CompleteTags ¶ added in v0.9.2
func (m *MockStorage) CompleteTags(arg0 context.Context, arg1 *storage.CompleteTagsQuery, arg2 *storage.FetchOptions) (*storage.CompleteTagsResult, error)
CompleteTags mocks base method
func (*MockStorage) CompleteTagsCompressed ¶ added in v0.15.0
func (m *MockStorage) CompleteTagsCompressed(arg0 context.Context, arg1 *storage.CompleteTagsQuery, arg2 *storage.FetchOptions) (*storage.CompleteTagsResult, error)
CompleteTagsCompressed mocks base method
func (*MockStorage) EXPECT ¶ added in v0.9.2
func (m *MockStorage) EXPECT() *MockStorageMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockStorage) ErrorBehavior ¶ added in v0.13.0
func (m *MockStorage) ErrorBehavior() storage.ErrorBehavior
ErrorBehavior mocks base method
func (*MockStorage) FetchBlocks ¶ added in v0.9.2
func (m *MockStorage) FetchBlocks(arg0 context.Context, arg1 *storage.FetchQuery, arg2 *storage.FetchOptions) (block.Result, error)
FetchBlocks mocks base method
func (*MockStorage) FetchCompressed ¶ added in v0.9.2
func (m *MockStorage) FetchCompressed(arg0 context.Context, arg1 *storage.FetchQuery, arg2 *storage.FetchOptions) (SeriesFetchResult, Cleanup, error)
FetchCompressed mocks base method
func (*MockStorage) FetchProm ¶ added in v0.15.0
func (m *MockStorage) FetchProm(arg0 context.Context, arg1 *storage.FetchQuery, arg2 *storage.FetchOptions) (storage.PromResult, error)
FetchProm mocks base method
func (*MockStorage) Name ¶ added in v0.13.0
func (m *MockStorage) Name() string
Name mocks base method
func (*MockStorage) SearchCompressed ¶ added in v0.9.2
func (m *MockStorage) SearchCompressed(arg0 context.Context, arg1 *storage.FetchQuery, arg2 *storage.FetchOptions) (TagResult, Cleanup, error)
SearchCompressed mocks base method
func (*MockStorage) SearchSeries ¶ added in v0.9.2
func (m *MockStorage) SearchSeries(arg0 context.Context, arg1 *storage.FetchQuery, arg2 *storage.FetchOptions) (*storage.SearchResults, error)
SearchSeries mocks base method
func (*MockStorage) Type ¶ added in v0.9.2
func (m *MockStorage) Type() storage.Type
Type mocks base method
func (*MockStorage) Write ¶ added in v0.9.2
func (m *MockStorage) Write(arg0 context.Context, arg1 *storage.WriteQuery) error
Write mocks base method
type MockStorageMockRecorder ¶ added in v0.9.2
type MockStorageMockRecorder struct {
// contains filtered or unexported fields
}
MockStorageMockRecorder is the mock recorder for MockStorage
func (*MockStorageMockRecorder) Close ¶ added in v0.9.2
func (mr *MockStorageMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockStorageMockRecorder) CompleteTags ¶ added in v0.9.2
func (mr *MockStorageMockRecorder) CompleteTags(arg0, arg1, arg2 interface{}) *gomock.Call
CompleteTags indicates an expected call of CompleteTags
func (*MockStorageMockRecorder) CompleteTagsCompressed ¶ added in v0.15.0
func (mr *MockStorageMockRecorder) CompleteTagsCompressed(arg0, arg1, arg2 interface{}) *gomock.Call
CompleteTagsCompressed indicates an expected call of CompleteTagsCompressed
func (*MockStorageMockRecorder) ErrorBehavior ¶ added in v0.13.0
func (mr *MockStorageMockRecorder) ErrorBehavior() *gomock.Call
ErrorBehavior indicates an expected call of ErrorBehavior
func (*MockStorageMockRecorder) FetchBlocks ¶ added in v0.9.2
func (mr *MockStorageMockRecorder) FetchBlocks(arg0, arg1, arg2 interface{}) *gomock.Call
FetchBlocks indicates an expected call of FetchBlocks
func (*MockStorageMockRecorder) FetchCompressed ¶ added in v0.9.2
func (mr *MockStorageMockRecorder) FetchCompressed(arg0, arg1, arg2 interface{}) *gomock.Call
FetchCompressed indicates an expected call of FetchCompressed
func (*MockStorageMockRecorder) FetchProm ¶ added in v0.15.0
func (mr *MockStorageMockRecorder) FetchProm(arg0, arg1, arg2 interface{}) *gomock.Call
FetchProm indicates an expected call of FetchProm
func (*MockStorageMockRecorder) Name ¶ added in v0.13.0
func (mr *MockStorageMockRecorder) Name() *gomock.Call
Name indicates an expected call of Name
func (*MockStorageMockRecorder) SearchCompressed ¶ added in v0.9.2
func (mr *MockStorageMockRecorder) SearchCompressed(arg0, arg1, arg2 interface{}) *gomock.Call
SearchCompressed indicates an expected call of SearchCompressed
func (*MockStorageMockRecorder) SearchSeries ¶ added in v0.9.2
func (mr *MockStorageMockRecorder) SearchSeries(arg0, arg1, arg2 interface{}) *gomock.Call
SearchSeries indicates an expected call of SearchSeries
func (*MockStorageMockRecorder) Type ¶ added in v0.9.2
func (mr *MockStorageMockRecorder) Type() *gomock.Call
Type indicates an expected call of Type
func (*MockStorageMockRecorder) Write ¶ added in v0.9.2
func (mr *MockStorageMockRecorder) Write(arg0, arg1 interface{}) *gomock.Call
Write indicates an expected call of Write
type MultiFetchResult ¶ added in v0.4.8
type MultiFetchResult interface { // Add appends series fetch results to the accumulator. Add( fetchResult SeriesFetchResult, attrs genericstorage.Attributes, err error, ) // FinalResult returns a series fetch result containing deduplicated series // iterators and their metadata, and any errors encountered. FinalResult() (SeriesFetchResult, error) // FinalResult returns a series fetch result containing deduplicated series // iterators and their metadata, as well as any attributes corresponding to // these results, and any errors encountered. FinalResultWithAttrs() (SeriesFetchResult, []genericstorage.Attributes, error) // Close releases all resources held by this accumulator. Close() error }
MultiFetchResult is a deduping accumalator for series iterators that allows merging using a given strategy.
type MultiFetchTagsResult ¶ added in v0.4.8
type MultiFetchTagsResult interface { // Add adds tagged ID iterators to the accumulator. Add( newIterator client.TaggedIDsIterator, meta block.ResultMetadata, err error, ) // FinalResult returns a deduped list of tag iterators with // corresponding series IDs. FinalResult() (TagResult, error) // Close releases all resources held by this accumulator. Close() error }
MultiFetchTagsResult is a deduping accumalator for tag iterators.
func NewMultiFetchTagsResult ¶ added in v0.4.8
func NewMultiFetchTagsResult() MultiFetchTagsResult
NewMultiFetchTagsResult builds a new multi fetch tags result
type MultiTagResult ¶ added in v0.4.8
type MultiTagResult struct { // ID is the series ID. ID ident.ID // Iter is the tag iterator for the series. Iter ident.TagIterator }
MultiTagResult represents a tag iterator with its string ID.
type NewClientFromConfig ¶
type NewClientFromConfig func( cfg client.Configuration, params client.ConfigurationParameters, custom ...client.CustomAdminOption, ) (client.Client, error)
NewClientFromConfig is a method that can be set on ClusterStaticConfiguration to allow overriding the client initialization.
type Querier ¶
type Querier interface { // FetchCompressed fetches timeseries data based on a query. FetchCompressed( ctx context.Context, query *genericstorage.FetchQuery, options *genericstorage.FetchOptions, ) (SeriesFetchResult, Cleanup, error) // SearchCompressed fetches matching tags based on a query. SearchCompressed( ctx context.Context, query *genericstorage.FetchQuery, options *genericstorage.FetchOptions, ) (TagResult, Cleanup, error) // CompleteTagsCompressed returns autocompleted tag results. CompleteTagsCompressed( ctx context.Context, query *genericstorage.CompleteTagsQuery, options *genericstorage.FetchOptions, ) (*genericstorage.CompleteTagsResult, error) }
Querier handles queries against an M3 instance.
type RetentionResolution ¶
RetentionResolution is a tuple of retention and resolution that describes an aggregated metrics policy.
type SeriesFetchResult ¶ added in v0.14.0
type SeriesFetchResult struct { // Metadata is the set of metadata associated with the fetch result. Metadata block.ResultMetadata // SeriesIterators is the list of series iterators for the result. SeriesIterators encoding.SeriesIterators }
SeriesFetchResult is a fetch result with associated metadata.
type Storage ¶
type Storage interface { genericstorage.Storage Querier }
Storage provides an interface for reading and writing to the TSDB.
func NewStorage ¶
func NewStorage( clusters Clusters, opts m3db.Options, instrumentOpts instrument.Options, ) (Storage, error)
NewStorage creates a new local m3storage instance.
type TagResult ¶ added in v0.14.0
type TagResult struct { // Metadata is the set of metadata associated with the fetch result. Metadata block.ResultMetadata // Tags is the list of tags for the result. Tags []MultiTagResult }
TagResult is a fetch tag result with associated metadata.
type UnaggregatedClusterNamespaceDefinition ¶
type UnaggregatedClusterNamespaceDefinition struct { NamespaceID ident.ID Session client.Session Retention time.Duration }
UnaggregatedClusterNamespaceDefinition is the definition for the cluster namespace that holds unaggregated metrics data.
func (UnaggregatedClusterNamespaceDefinition) Validate ¶
func (def UnaggregatedClusterNamespaceDefinition) Validate() error
Validate will validate the cluster namespace definition.