Documentation
¶
Overview ¶
This file and its contents are licensed under the Apache License 2.0. Please see the included NOTICE for copyright information and LICENSE for a copy of the license. +k8s:deepcopy-gen=package
Promscale stores some configuration information in the Postgres database which it is connected to. We call this configuration the Promscale dataset configuration.
The dataset configuration handles config items like retention period, chunk interval, compression, etc. This config options are applied on startup as SQL queries. For more context review the `/docs/dataset.md` page and the `dataset/config.go` file.
+k8s:deepcopy-gen=package
This file and its contents are licensed under the Apache License 2.0. Please see the included NOTICE for copyright information and LICENSE for a copy of the license.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StringToDayDurationHookFunc ¶
func StringToDayDurationHookFunc() mapstructure.DecodeHookFunc
StringToDayDurationHookFunc returns a mapstructure.DecodeHookFunc that converts strings to DayDuration.
Types ¶
type Config ¶
Config represents a dataset config.
func (*Config) Apply ¶
Apply applies the configuration to the database via the supplied DB connection.
func (*Config) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.
func (*Config) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DayDuration ¶
DayDuration acts like a time.Duration with support for "d" unit which is used for specifying number of days in duration.
func (DayDuration) String ¶
func (d DayDuration) String() string
String returns a string value of DayDuration.
func (*DayDuration) UnmarshalText ¶
func (d *DayDuration) UnmarshalText(s []byte) error
UnmarshalText unmarshals strings into DayDuration values while handling the day unit. It leans heavily into time.ParseDuration.
type Metrics ¶
type Metrics struct {
ChunkInterval DayDuration `mapstructure:"default_chunk_interval" yaml:"default_chunk_interval"`
Compression *bool `mapstructure:"compress_data" yaml:"compress_data"` // Using pointer to check if the the value was set.
HALeaseRefresh DayDuration `mapstructure:"ha_lease_refresh" yaml:"ha_lease_refresh"`
HALeaseTimeout DayDuration `mapstructure:"ha_lease_timeout" yaml:"ha_lease_timeout"`
RetentionPeriod DayDuration `mapstructure:"default_retention_period" yaml:"default_retention_period"`
}
Metrics contains dataset configuration options for metrics data.
func (*Metrics) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metrics.
func (*Metrics) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Traces ¶
type Traces struct {
RetentionPeriod DayDuration `mapstructure:"default_retention_period" yaml:"default_retention_period"`
}
Traces contains dataset configuration options for traces data.
func (*Traces) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Traces.
func (*Traces) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.