Documentation ¶
Index ¶
- func TagOptionsFromConfig(cfg TagOptionsConfiguration) (models.TagOptions, error)
- type BackendStorageType
- type CacheConfiguration
- type CarbonConfiguration
- type CarbonIngesterAggregationConfiguration
- type CarbonIngesterConfiguration
- type CarbonIngesterRuleConfiguration
- type CarbonIngesterStoragePolicyConfiguration
- type ClusterManagementConfiguration
- type Configuration
- type Filter
- type FilterConfiguration
- type IngestConfiguration
- type LimitsConfiguration
- type LocalConfiguration
- type QueryConversionCacheConfiguration
- type RPCConfiguration
- type TagOptionsConfiguration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TagOptionsFromConfig ¶ added in v0.4.8
func TagOptionsFromConfig(cfg TagOptionsConfiguration) (models.TagOptions, error)
TagOptionsFromConfig translates tag option configuration into tag options.
Types ¶
type BackendStorageType ¶ added in v0.4.4
type BackendStorageType string
BackendStorageType is an enum for different backends.
const ( // GRPCStorageType is for backends which only support grpc endpoints. GRPCStorageType BackendStorageType = "grpc" // M3DBStorageType is for m3db backend. M3DBStorageType BackendStorageType = "m3db" )
type CacheConfiguration ¶ added in v0.7.0
type CacheConfiguration struct { // QueryConversion cache policy. QueryConversion *QueryConversionCacheConfiguration `yaml:"queryConversion"` }
CacheConfiguration is the cache configurations.
func (CacheConfiguration) QueryConversionCacheConfiguration ¶ added in v0.7.0
func (c CacheConfiguration) QueryConversionCacheConfiguration() QueryConversionCacheConfiguration
QueryConversionCacheConfiguration returns the query conversion cache configuration or default if none is specified.
type CarbonConfiguration ¶ added in v0.5.0
type CarbonConfiguration struct {
Ingester *CarbonIngesterConfiguration `yaml:"ingester"`
}
CarbonConfiguration is the configuration for the carbon server.
type CarbonIngesterAggregationConfiguration ¶ added in v0.5.0
type CarbonIngesterAggregationConfiguration struct { Enabled *bool `yaml:"enabled"` Type *aggregation.Type `yaml:"type"` }
CarbonIngesterAggregationConfiguration is the configuration struct for the aggregation for a carbon ingest rule's storage policy.
func (*CarbonIngesterAggregationConfiguration) EnabledOrDefault ¶ added in v0.5.0
func (c *CarbonIngesterAggregationConfiguration) EnabledOrDefault() bool
EnabledOrDefault returns whether aggregation should be enabled based on the provided configuration, or a default value otherwise.
func (*CarbonIngesterAggregationConfiguration) TypeOrDefault ¶ added in v0.5.0
func (c *CarbonIngesterAggregationConfiguration) TypeOrDefault() aggregation.Type
TypeOrDefault returns the aggregation type that should be used based on the provided configuration, or a default value otherwise.
type CarbonIngesterConfiguration ¶ added in v0.5.0
type CarbonIngesterConfiguration struct { Debug bool `yaml:"debug"` ListenAddress string `yaml:"listenAddress"` MaxConcurrency int `yaml:"maxConcurrency"` Rules []CarbonIngesterRuleConfiguration `yaml:"rules"` }
CarbonIngesterConfiguration is the configuration struct for carbon ingestion.
func (*CarbonIngesterConfiguration) ListenAddressOrDefault ¶ added in v0.6.0
func (c *CarbonIngesterConfiguration) ListenAddressOrDefault() string
ListenAddressOrDefault returns the specified carbon ingester listen address if provided, or the default value if not.
func (*CarbonIngesterConfiguration) RulesOrDefault ¶ added in v0.5.0
func (c *CarbonIngesterConfiguration) RulesOrDefault(namespaces m3.ClusterNamespaces) []CarbonIngesterRuleConfiguration
RulesOrDefault returns the specified carbon ingester rules if provided, or generates reasonable defaults using the provided aggregated namespaces if not.
type CarbonIngesterRuleConfiguration ¶ added in v0.5.0
type CarbonIngesterRuleConfiguration struct { Pattern string `yaml:"pattern"` Aggregation CarbonIngesterAggregationConfiguration `yaml:"aggregation"` Policies []CarbonIngesterStoragePolicyConfiguration `yaml:"policies"` }
CarbonIngesterRuleConfiguration is the configuration struct for a carbon ingestion rule.
type CarbonIngesterStoragePolicyConfiguration ¶ added in v0.5.0
type CarbonIngesterStoragePolicyConfiguration struct { Resolution time.Duration `yaml:"resolution" validate:"nonzero"` Retention time.Duration `yaml:"retention" validate:"nonzero"` }
CarbonIngesterStoragePolicyConfiguration is the configuration struct for a carbon rule's storage policies.
type ClusterManagementConfiguration ¶
type ClusterManagementConfiguration struct { // Etcd is the client configuration for etcd. Etcd etcdclient.Configuration `yaml:"etcd"` }
ClusterManagementConfiguration is configuration for the placemement, namespaces and database management endpoints (optional).
type Configuration ¶
type Configuration struct { // Metrics configuration. Metrics instrument.MetricsConfiguration `yaml:"metrics"` // Tracing configures opentracing. If not provided, tracing is disabled. Tracing instrument.TracingConfiguration `yaml:"tracing"` // Clusters is the DB cluster configurations for read, write and // query endpoints. Clusters m3.ClustersStaticConfiguration `yaml:"clusters"` // LocalConfiguration is the local embedded configuration if running // coordinator embedded in the DB. Local *LocalConfiguration `yaml:"local"` // ClusterManagement for placemement, namespaces and database management // endpoints (optional). ClusterManagement *ClusterManagementConfiguration `yaml:"clusterManagement"` // ListenAddress is the server listen address. ListenAddress *listenaddress.Configuration `yaml:"listenAddress" validate:"nonzero"` // Filter is the read/write/complete tags filter configuration. Filter FilterConfiguration `yaml:"filter"` // RPC is the RPC configuration. RPC *RPCConfiguration `yaml:"rpc"` // Backend is the backend store for query service. We currently support grpc and m3db (default). Backend BackendStorageType `yaml:"backend"` // TagOptions is the tag configuration options. TagOptions TagOptionsConfiguration `yaml:"tagOptions"` // ReadWorkerPool is the worker pool policy for read requests. ReadWorkerPool xconfig.WorkerPoolPolicy `yaml:"readWorkerPoolPolicy"` // WriteWorkerPool is the worker pool policy for write requests. WriteWorkerPool xconfig.WorkerPoolPolicy `yaml:"writeWorkerPoolPolicy"` // Downsample configurates how the metrics should be downsampled. Downsample downsample.Configuration `yaml:"downsample"` // Ingest is the ingest server. Ingest *IngestConfiguration `yaml:"ingest"` // Carbon is the carbon configuration. Carbon *CarbonConfiguration `yaml:"carbon"` // Limits specifies limits on per-query resource usage. Limits *LimitsConfiguration `yaml:"limits"` // LookbackDuration determines the lookback duration for queries LookbackDuration *time.Duration `yaml:"lookbackDuration"` // Cache configurations. Cache CacheConfiguration `yaml:"cache"` }
Configuration is the configuration for the query service.
func (Configuration) LimitsOrDefault ¶ added in v0.6.0
func (c Configuration) LimitsOrDefault() *LimitsConfiguration
LimitsOrDefault returns the specified limit configuration if provided, or the default value otherwise.
func (Configuration) LookbackDurationOrDefault ¶ added in v0.5.0
func (c Configuration) LookbackDurationOrDefault() (time.Duration, error)
LookbackDurationOrDefault validates the LookbackDuration
type Filter ¶ added in v0.5.0
type Filter string
Filter is a query filter type.
const ( // FilterLocalOnly is a filter that specifies local only storage should be used. FilterLocalOnly Filter = "local_only" // FilterRemoteOnly is a filter that specifies remote only storage should be used. FilterRemoteOnly Filter = "remote_only" // FilterAllowAll is a filter that specifies all storages should be used. FilterAllowAll Filter = "allow_all" // FilterAllowNone is a filter that specifies no storages should be used. FilterAllowNone Filter = "allow_none" )
type FilterConfiguration ¶ added in v0.5.0
type FilterConfiguration struct { Read Filter `yaml:"read"` Write Filter `yaml:"write"` CompleteTags Filter `yaml:"completeTags"` }
FilterConfiguration is the filters for write/read/complete tags storage filters.
type IngestConfiguration ¶ added in v0.4.7
type IngestConfiguration struct { // Ingester is the configuration for storage based ingester. Ingester ingestm3msg.Configuration `yaml:"ingester"` // M3Msg is the configuration for m3msg server. M3Msg m3msg.Configuration `yaml:"m3msg"` }
IngestConfiguration is the configuration for ingestion server.
type LimitsConfiguration ¶ added in v0.4.8
type LimitsConfiguration struct {
MaxComputedDatapoints int64 `yaml:"maxComputedDatapoints"`
}
LimitsConfiguration represents limitations on per-query resource usage. Zero or negative values imply no limit.
type LocalConfiguration ¶
type LocalConfiguration struct { // Namespaces is the list of namespaces that the local embedded DB has. Namespaces []m3.ClusterStaticNamespaceConfiguration `yaml:"namespaces"` }
LocalConfiguration is the local embedded configuration if running coordinator embedded in the DB.
type QueryConversionCacheConfiguration ¶ added in v0.7.0
type QueryConversionCacheConfiguration struct {
Size *int `yaml:"size"`
}
QueryConversionCacheConfiguration is the query conversion cache configuration.
func (*QueryConversionCacheConfiguration) SizeOrDefault ¶ added in v0.7.0
func (q *QueryConversionCacheConfiguration) SizeOrDefault() int
SizeOrDefault returns the provided size or the default value is none is provided.
func (*QueryConversionCacheConfiguration) Validate ¶ added in v0.7.0
func (q *QueryConversionCacheConfiguration) Validate() error
Validate validates the QueryConversionCacheConfiguration settings.
type RPCConfiguration ¶
type RPCConfiguration struct { // Enabled determines if coordinator RPC is enabled for remote calls. Enabled bool `yaml:"enabled"` // ListenAddress is the RPC server listen address. ListenAddress string `yaml:"listenAddress"` // RemoteListenAddresses is the remote listen addresses to call for remote // coordinator calls. RemoteListenAddresses []string `yaml:"remoteListenAddresses"` }
RPCConfiguration is the RPC configuration for the coordinator for the GRPC server used for remote coordinator to coordinator calls.
type TagOptionsConfiguration ¶ added in v0.4.8
type TagOptionsConfiguration struct { // MetricName specifies the tag name that corresponds to the metric's name tag // If not provided, defaults to `__name__`. MetricName string `yaml:"metricName"` // BucketName specifies the tag name that corresponds to the metric's bucket. // If not provided, defaults to `le`. BucketName string `yaml:"bucketName"` // Scheme determines the default ID generation scheme. Defaults to TypeLegacy. Scheme models.IDSchemeType `yaml:"idScheme"` }
TagOptionsConfiguration is the configuration for shared tag options Currently only name, but can expand to cover deduplication settings, or other relevant options.