Documentation ¶
Overview ¶
Package m3 is a generated GoMock package.
Index ¶
- Constants
- Variables
- func ConvertM3DBSeriesIterators(result consolidators.SeriesFetchResult, bounds models.Bounds, opts Options) ([]block.Block, error)
- func FetchResultToBlockResult(result consolidators.SeriesFetchResult, query *storage.FetchQuery, ...) (block.Result, error)
- func NewEncodedBlock(result consolidators.SeriesFetchResult, bounds models.Bounds, lastBlock bool, ...) (block.Block, error)
- func NewEncodedSeriesIter(meta block.Metadata, seriesMetas []block.SeriesMeta, ...) block.SeriesIter
- type AggregatedClusterNamespaceDefinition
- type BlockSeriesProcessor
- type BlockSeriesProcessorFn
- type Cleanup
- type ClusterConfigType
- type ClusterNamespace
- type ClusterNamespaceDownsampleOptions
- type ClusterNamespaceOptions
- type ClusterNamespaces
- type ClusterNamespacesByResolutionAsc
- type ClusterNamespacesByRetentionAsc
- type ClusterNamespacesListener
- type ClusterNamespacesWatcher
- type ClusterStaticConfiguration
- type ClusterStaticNamespaceConfiguration
- type Clusters
- type ClustersStaticConfiguration
- func (c ClustersStaticConfiguration) NewDynamicClusters(instrumentOpts instrument.Options, opts ClustersStaticConfigurationOptions, ...) (Clusters, error)
- func (c ClustersStaticConfiguration) NewStaticClusters(instrumentOpts instrument.Options, opts ClustersStaticConfigurationOptions, ...) (Clusters, error)
- type ClustersStaticConfigurationOptions
- type DownsampleClusterStaticNamespaceConfiguration
- type DynamicClusterNamespaceConfiguration
- type DynamicClusterOptions
- type GraphiteBlockIteratorsFn
- type IteratorBatchingFn
- type MockClusterNamespace
- type MockClusterNamespaceMockRecorder
- type MockStorage
- func (m *MockStorage) Close() error
- func (m *MockStorage) CompleteTags(arg0 context.Context, arg1 *storage.CompleteTagsQuery, ...) (*consolidators.CompleteTagsResult, error)
- func (m *MockStorage) CompleteTagsCompressed(arg0 context.Context, arg1 *storage.CompleteTagsQuery, ...) (*consolidators.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) (consolidators.MultiFetchResult, error)
- func (m *MockStorage) FetchCompressedResult(arg0 context.Context, arg1 *storage.FetchQuery, arg2 *storage.FetchOptions) (consolidators.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) QueryStorageMetadataAttributes(arg0 context.Context, arg1, arg2 time.Time, arg3 *storage.FetchOptions) ([]storagemetadata.Attributes, error)
- func (m *MockStorage) SearchCompressed(arg0 context.Context, arg1 *storage.FetchQuery, arg2 *storage.FetchOptions) (consolidators.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) FetchCompressedResult(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) QueryStorageMetadataAttributes(arg0, arg1, arg2, arg3 interface{}) *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 NewClientFromConfig
- type Options
- type Querier
- type RetentionResolution
- type SeriesIteratorProcessor
- type Storage
- type TagsTransform
- type UnaggregatedClusterNamespaceDefinition
Constants ¶
const ( // ClusterConfigTypeStatic is for static configuration. ClusterConfigTypeStatic = iota // ClusterConfigTypeDynamic is for dynamic configuration. ClusterConfigTypeDynamic )
Variables ¶
var ( // DefaultClusterNamespaceDownsampleOptions is a default options. // NB(antanas): this was made public to access it in promremote storage. // Ideally downsampling could be decoupled from m3 storage. DefaultClusterNamespaceDownsampleOptions = ClusterNamespaceDownsampleOptions{ All: true, } )
Functions ¶
func ConvertM3DBSeriesIterators ¶ added in v1.2.0
func ConvertM3DBSeriesIterators( result consolidators.SeriesFetchResult, bounds models.Bounds, opts Options, ) ([]block.Block, error)
ConvertM3DBSeriesIterators converts series iterators to iterator blocks. If lookback is greater than 0, converts the entire series into a single block, otherwise, splits the series into blocks.
func FetchResultToBlockResult ¶ added in v0.15.0
func FetchResultToBlockResult( result consolidators.SeriesFetchResult, query *storage.FetchQuery, options *storage.FetchOptions, opts Options, ) (block.Result, error)
FetchResultToBlockResult converts an encoded SeriesIterator fetch result into blocks.
func NewEncodedBlock ¶ added in v1.2.0
func NewEncodedBlock( result consolidators.SeriesFetchResult, bounds models.Bounds, lastBlock bool, opts Options, ) (block.Block, error)
NewEncodedBlock builds an encoded block.
func NewEncodedSeriesIter ¶ added in v1.2.0
func NewEncodedSeriesIter( meta block.Metadata, seriesMetas []block.SeriesMeta, seriesIters []encoding.SeriesIterator, lookback time.Duration, instrumented bool, ) block.SeriesIter
NewEncodedSeriesIter creates a new encoded series iterator.
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 BlockSeriesProcessor ¶ added in v1.2.0
type BlockSeriesProcessor interface {
Process(bl block.Block, opts Options, fn BlockSeriesProcessorFn) error
}
BlockSeriesProcessor processes blocks.
func NewBlockSeriesProcessor ¶ added in v1.2.0
func NewBlockSeriesProcessor() BlockSeriesProcessor
NewBlockSeriesProcessor creates a standard block processor.
type BlockSeriesProcessorFn ¶ added in v1.2.0
type BlockSeriesProcessorFn func( iter block.SeriesIter, ) error
BlockSeriesProcessorFn processes an individual series iterator.
type Cleanup ¶
type Cleanup func() error
Cleanup is a cleanup function to be called after resources are freed.
type ClusterConfigType ¶ added in v1.2.0
type ClusterConfigType int
ClusterConfigType is an enum representing the configuration used to create a Clusters interface
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 NewClusterNamespaceOptions ¶ added in v1.2.0
func NewClusterNamespaceOptions( attributes storagemetadata.Attributes, downsample *ClusterNamespaceDownsampleOptions, ) ClusterNamespaceOptions
NewClusterNamespaceOptions creates new cluster namespace options.
func (ClusterNamespaceOptions) Attributes ¶
func (o ClusterNamespaceOptions) Attributes() storagemetadata.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 ClusterNamespacesListener ¶ added in v1.0.0
type ClusterNamespacesListener interface { // OnUpdate is called when updates have occurred passing in the new namespaces. OnUpdate(namespaces ClusterNamespaces) }
ClusterNamespacesListener is a listener for receiving updates from a ClusterNamespacesWatcher.
type ClusterNamespacesWatcher ¶ added in v1.0.0
type ClusterNamespacesWatcher interface { // Update updates the current namespaces. Update(namespaces ClusterNamespaces) error // Get returns the current namespaces. Get() ClusterNamespaces // RegisterListener registers a listener for updates to cluster namespaces. // If a value is currently present, it will synchronously call back the listener. RegisterListener(listener ClusterNamespacesListener) xresource.SimpleCloser // Close closes the watcher and all descendent watches. Close() }
ClusterNamespacesWatcher allows interested parties to watch for changes to the cluster namespaces and register callbacks to be invoked when changes are detected.
func NewClusterNamespacesWatcher ¶ added in v1.0.0
func NewClusterNamespacesWatcher() ClusterNamespacesWatcher
NewClusterNamespacesWatcher creates a new ClusterNamespacesWatcher.
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 storagemetadata.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"` }
ClusterStaticNamespaceConfiguration describes the namespaces in a static cluster.
type Clusters ¶
type Clusters interface { io.Closer // ClusterNamespaces returns all known and ready cluster namespaces. ClusterNamespaces() ClusterNamespaces // NonReadyClusterNamespaces returns all cluster namespaces not in the ready state. NonReadyClusterNamespaces() ClusterNamespaces // UnaggregatedClusterNamespace returns the valid unaggregated // cluster namespace. If the namespace is not yet initialized, returns false. UnaggregatedClusterNamespace() (ClusterNamespace, bool) // AggregatedClusterNamespace returns an aggregated cluster namespace // at a specific retention and resolution. AggregatedClusterNamespace(attrs RetentionResolution) (ClusterNamespace, bool) // ConfigType returns the type of configuration used to create this Clusters // object. ConfigType() ClusterConfigType }
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.
func NewDynamicClusters ¶ added in v1.0.0
func NewDynamicClusters(opts DynamicClusterOptions) (Clusters, error)
NewDynamicClusters creates an implementation of the Clusters interface supports dynamic updating of cluster namespaces.
type ClustersStaticConfiguration ¶
type ClustersStaticConfiguration []ClusterStaticConfiguration
ClustersStaticConfiguration is a set of static cluster configurations.
func (ClustersStaticConfiguration) NewDynamicClusters ¶ added in v1.0.0
func (c ClustersStaticConfiguration) NewDynamicClusters( instrumentOpts instrument.Options, opts ClustersStaticConfigurationOptions, clusterNamespacesWatcher ClusterNamespacesWatcher, ) (Clusters, error)
NewDynamicClusters instantiates a new Clusters instance that pulls cluster information from etcd.
func (ClustersStaticConfiguration) NewStaticClusters ¶ added in v1.0.0
func (c ClustersStaticConfiguration) NewStaticClusters( instrumentOpts instrument.Options, opts ClustersStaticConfigurationOptions, clusterNamespacesWatcher ClusterNamespacesWatcher, ) (Clusters, error)
NewStaticClusters instantiates a new Clusters instance based on static configuration.
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 DynamicClusterNamespaceConfiguration ¶ added in v1.0.0
type DynamicClusterNamespaceConfiguration struct {
// contains filtered or unexported fields
}
DynamicClusterNamespaceConfiguration is the configuration for dynamically fetching namespace configuration.
type DynamicClusterOptions ¶ added in v1.0.0
type DynamicClusterOptions interface { // Validate validates the DynamicClusterOptions. Validate() error // SetDynamicClusterNamespaceConfiguration sets the configuration for the dynamically fetching cluster namespaces. SetDynamicClusterNamespaceConfiguration(value []DynamicClusterNamespaceConfiguration) DynamicClusterOptions // SetDynamicClusterNamespaceConfiguration returns the configuration for the dynamically fetching cluster namespaces. DynamicClusterNamespaceConfiguration() []DynamicClusterNamespaceConfiguration // SetInstrumentOptions sets the instrument options. SetInstrumentOptions(value instrument.Options) DynamicClusterOptions // InstrumentOptions returns the instrument options. InstrumentOptions() instrument.Options // SetClusterNamespacesWatcher sets the namespaces watcher which alerts components that // need to regenerate configuration when the ClusterNamespaces change. SetClusterNamespacesWatcher(value ClusterNamespacesWatcher) DynamicClusterOptions // ClusterNamespacesWatcher returns the namespaces watcher which alerts components that // need to regenerate configuration when the ClusterNamespaces change. ClusterNamespacesWatcher() ClusterNamespacesWatcher }
DynamicClusterOptions is the options for a new dynamic Cluster.
func NewDynamicClusterOptions ¶ added in v1.0.0
func NewDynamicClusterOptions() DynamicClusterOptions
NewDynamicClusterOptions returns new DynamicClusterOptions.
type GraphiteBlockIteratorsFn ¶ added in v1.2.0
type GraphiteBlockIteratorsFn func( block.Block, ) ([]block.SeriesIterBatch, error)
GraphiteBlockIteratorsFn returns block iterators for graphite decoding.
type IteratorBatchingFn ¶ added in v1.2.0
type IteratorBatchingFn func( concurrency int, seriesBlockIterators []encoding.SeriesIterator, seriesMetas []block.SeriesMeta, meta block.Metadata, opts Options, ) ([]block.SeriesIterBatch, error)
IteratorBatchingFn determines how the iterator is split into batches.
type MockClusterNamespace ¶ added in v1.2.0
type MockClusterNamespace struct {
// contains filtered or unexported fields
}
MockClusterNamespace is a mock of ClusterNamespace interface.
func NewMockClusterNamespace ¶ added in v1.2.0
func NewMockClusterNamespace(ctrl *gomock.Controller) *MockClusterNamespace
NewMockClusterNamespace creates a new mock instance.
func (*MockClusterNamespace) EXPECT ¶ added in v1.2.0
func (m *MockClusterNamespace) EXPECT() *MockClusterNamespaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockClusterNamespace) NamespaceID ¶ added in v1.2.0
func (m *MockClusterNamespace) NamespaceID() ident.ID
NamespaceID mocks base method.
func (*MockClusterNamespace) Options ¶ added in v1.2.0
func (m *MockClusterNamespace) Options() ClusterNamespaceOptions
Options mocks base method.
func (*MockClusterNamespace) Session ¶ added in v1.2.0
func (m *MockClusterNamespace) Session() client.Session
Session mocks base method.
type MockClusterNamespaceMockRecorder ¶ added in v1.2.0
type MockClusterNamespaceMockRecorder struct {
// contains filtered or unexported fields
}
MockClusterNamespaceMockRecorder is the mock recorder for MockClusterNamespace.
func (*MockClusterNamespaceMockRecorder) NamespaceID ¶ added in v1.2.0
func (mr *MockClusterNamespaceMockRecorder) NamespaceID() *gomock.Call
NamespaceID indicates an expected call of NamespaceID.
func (*MockClusterNamespaceMockRecorder) Options ¶ added in v1.2.0
func (mr *MockClusterNamespaceMockRecorder) Options() *gomock.Call
Options indicates an expected call of Options.
func (*MockClusterNamespaceMockRecorder) Session ¶ added in v1.2.0
func (mr *MockClusterNamespaceMockRecorder) Session() *gomock.Call
Session indicates an expected call of Session.
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) (*consolidators.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) (*consolidators.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) (consolidators.MultiFetchResult, error)
FetchCompressed mocks base method.
func (*MockStorage) FetchCompressedResult ¶ added in v1.2.0
func (m *MockStorage) FetchCompressedResult(arg0 context.Context, arg1 *storage.FetchQuery, arg2 *storage.FetchOptions) (consolidators.SeriesFetchResult, Cleanup, error)
FetchCompressedResult 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) QueryStorageMetadataAttributes ¶ added in v1.2.0
func (m *MockStorage) QueryStorageMetadataAttributes(arg0 context.Context, arg1, arg2 time.Time, arg3 *storage.FetchOptions) ([]storagemetadata.Attributes, error)
QueryStorageMetadataAttributes mocks base method.
func (*MockStorage) SearchCompressed ¶ added in v0.9.2
func (m *MockStorage) SearchCompressed(arg0 context.Context, arg1 *storage.FetchQuery, arg2 *storage.FetchOptions) (consolidators.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) FetchCompressedResult ¶ added in v1.2.0
func (mr *MockStorageMockRecorder) FetchCompressedResult(arg0, arg1, arg2 interface{}) *gomock.Call
FetchCompressedResult indicates an expected call of FetchCompressedResult.
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) QueryStorageMetadataAttributes ¶ added in v1.2.0
func (mr *MockStorageMockRecorder) QueryStorageMetadataAttributes(arg0, arg1, arg2, arg3 interface{}) *gomock.Call
QueryStorageMetadataAttributes indicates an expected call of QueryStorageMetadataAttributes.
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 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 Options ¶ added in v1.2.0
type Options interface { // SetSplitSeriesByBlock determines if the converter will split the series // by blocks, or if it will instead treat the entire series as a single block. SetSplitSeriesByBlock(bool) Options // SplittingSeriesByBlock returns true iff lookback duration is 0, and the // options has not been forced to return a single block. SplittingSeriesByBlock() bool // SetLookbackDuration sets the lookback duration. SetLookbackDuration(time.Duration) Options // LookbackDuration returns the lookback duration. LookbackDuration() time.Duration // SetLookbackDuration sets the consolidation function for the converter. SetConsolidationFunc(consolidators.ConsolidationFunc) Options // LookbackDuration returns the consolidation function. ConsolidationFunc() consolidators.ConsolidationFunc // SetLookbackDuration sets the tag options for the converter. SetTagOptions(models.TagOptions) Options // TagOptions returns the tag options. TagOptions() models.TagOptions // TagsTransform returns the transform to apply to tags before storage. TagsTransform() TagsTransform // SetTagsTransform sets the TagsTransform. SetTagsTransform(value TagsTransform) Options // SetIterAlloc sets the iterator allocator. SetIterAlloc(encoding.ReaderIteratorAllocate) Options // IterAlloc returns the reader iterator allocator. IterAlloc() encoding.ReaderIteratorAllocate // SetIteratorPools sets the iterator pools for the converter. SetIteratorPools(encoding.IteratorPools) Options // IteratorPools returns the iterator pools for the converter. IteratorPools() encoding.IteratorPools // SetCheckedBytesPool sets the checked bytes pool for the converter. SetCheckedBytesPool(pool.CheckedBytesPool) Options // CheckedBytesPool returns the checked bytes pools for the converter. CheckedBytesPool() pool.CheckedBytesPool // SetReadWorkerPool sets the read worker pool for the converter. SetReadWorkerPool(sync.PooledWorkerPool) Options // ReadWorkerPool returns the read worker pool for the converter. ReadWorkerPool() sync.PooledWorkerPool // SetReadWorkerPool sets the write worker pool for the converter. SetWriteWorkerPool(sync.PooledWorkerPool) Options // ReadWorkerPool returns the write worker pool for the converter. WriteWorkerPool() sync.PooledWorkerPool // SetSeriesConsolidationMatchOptions sets series consolidation options. SetSeriesConsolidationMatchOptions(value consolidators.MatchOptions) Options // SetSeriesConsolidationMatchOptions sets series consolidation options. SeriesConsolidationMatchOptions() consolidators.MatchOptions // SetSeriesIteratorProcessor sets the series iterator processor. SetSeriesIteratorProcessor(SeriesIteratorProcessor) Options // SeriesIteratorProcessor returns the series iterator processor. SeriesIteratorProcessor() SeriesIteratorProcessor // SetIteratorBatchingFn sets the batching function for the converter. SetIteratorBatchingFn(IteratorBatchingFn) Options // IteratorBatchingFn returns the batching function for the converter. IteratorBatchingFn() IteratorBatchingFn // SetBlockSeriesProcessor set the block series processor. SetBlockSeriesProcessor(value BlockSeriesProcessor) Options // BlockSeriesProcessor returns the block series processor. BlockSeriesProcessor() BlockSeriesProcessor // SetCustomAdminOptions sets custom admin options. SetCustomAdminOptions([]client.CustomAdminOption) Options // CustomAdminOptions gets custom admin options. CustomAdminOptions() []client.CustomAdminOption // SetInstrumented marks if the encoding step should have instrumentation enabled. SetInstrumented(bool) Options // Instrumented returns if the encoding step should have instrumentation enabled. Instrumented() bool // Validate ensures that the given block options are valid. Validate() error }
Options describes the options for encoded block converters. These options are generally config-backed and don't usually change across queries, unless certain query string parameters are present.
func NewOptions ¶ added in v1.2.0
func NewOptions() Options
NewOptions creates a default encoded block options which dictates how encoded blocks are generated.
type Querier ¶
type Querier interface { // FetchCompressedResult fetches timeseries data based on a query. FetchCompressedResult( ctx context.Context, query *genericstorage.FetchQuery, options *genericstorage.FetchOptions, ) (consolidators.SeriesFetchResult, Cleanup, error) // SearchCompressed fetches matching tags based on a query. SearchCompressed( ctx context.Context, query *genericstorage.FetchQuery, options *genericstorage.FetchOptions, ) (consolidators.TagResult, Cleanup, error) // CompleteTagsCompressed returns autocompleted tag results. CompleteTagsCompressed( ctx context.Context, query *genericstorage.CompleteTagsQuery, options *genericstorage.FetchOptions, ) (*consolidators.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 SeriesIteratorProcessor ¶ added in v1.2.0
type SeriesIteratorProcessor interface { // InspectSeries inspects SeriesIterator slices for a given query. InspectSeries( ctx context.Context, query index.Query, queryOpts index.QueryOptions, seriesIterators []encoding.SeriesIterator, ) error }
SeriesIteratorProcessor optionally defines methods to process series iterators.
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 Options, instrumentOpts instrument.Options, ) (Storage, error)
NewStorage creates a new local m3storage instance.
type TagsTransform ¶ added in v1.2.0
TagsTransform transforms a set of tags.
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.