config

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Copyright 2022 Huawei Cloud Computing Technologies Co., Ltd.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2022 Huawei Cloud Computing Technologies Co., Ltd.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2022 Huawei Cloud Computing Technologies Co., Ltd.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2022 Huawei Cloud Computing Technologies Co., Ltd.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	DefaultPoolSize    int = 30
	DefaultWaitTimeout int = 30
)
View Source
const (
	Fit       algorithmType = "fit"
	Predict   algorithmType = "predict"
	Detect    algorithmType = "detect"
	FitDetect algorithmType = "fit_detect"
)
View Source
const (
	// DefaultPath is default path for storing logs
	DefaultPath = "/opt/openGemini/logs/"

	// DefaultLevel is the level of logs will be emitted
	DefaultLevel = zap.InfoLevel

	// DefaultMaxSize is the max size of a log file
	DefaultMaxSize = 10 * 1024 * 1024 // 10MB

	// DefaultMaxNum is the max number of log files
	DefaultMaxNum = 30

	// DefaultMaxAge is the max duration a log file can keep
	DefaultMaxAge = 7 // 7days

	// DefaultCompressEnabled is whether the log files are compressed
	DefaultCompressEnabled = false
)
View Source
const (
	DefaultLoggingEnabled       = true
	DefaultRaftFileName         = "raft"
	DefaultGossipFileName       = "gossip"
	DefaultHTTPBindAddress      = ":8091"
	DefaultRPCBindAddress       = ":8092"
	DefaultRaftBindAddress      = ":8088"
	DefaultCommitTimeout        = 50 * time.Millisecond
	DefaultLeaderLeaseTimeout   = 500 * time.Millisecond
	DefaultElectionTimeout      = 1000 * time.Millisecond
	DefaultHeartbeatTimeout     = 1000 * time.Millisecond
	DefaultLeaseDuration        = 60 * time.Second
	DefaultConcurrentWriteLimit = 10
	DefaultVersion              = 0
	DefaultSplitRowThreshold    = 1000
	DefaultImbalanceFactor      = 0.3
	DefaultRaftStore            = "boltdb"
	DefaultHostname             = "localhost"
	DefaultSuspicionMult        = 4
	DefaultProbInterval         = toml.Duration(time.Second)
)
View Source
const (
	DefaultHistoryFile       = "history.json"
	DefaultMonitorAddress    = "127.0.0.1:8086"
	DefaultMonitorDatabase   = "monitor"
	DefaultMonitorRP         = "autogen"
	DefaultMonitorRPDuration = 7 * 24 * time.Hour

	// DefaultStoreEnabled is whether the system writes gathered information in
	// an InfluxDB system for historical analysis.
	DefaultStoreEnabled = false

	// DefaultStoreDatabase is the name of the database where gathered information is written.
	DefaultStoreDatabase = "_internal"

	// DefaultStoreInterval is the period between storing gathered information.
	DefaultStoreInterval = 10 * time.Second

	// DefaultHttpEndpoint is the address monitor write to
	DefaultHttpEndpoint = "127.0.0.1:8086"

	// MonitorRetentionPolicy Name of the retention policy used by the monitor service.
	MonitorRetentionPolicy = "autogen"

	// MonitorRetentionPolicyDuration Duration of the monitor retention policy.
	MonitorRetentionPolicyDuration = 7 * 24 * time.Hour

	// MonitorRetentionPolicyReplicaN Default replication factor to set on the monitor retention policy.
	MonitorRetentionPolicyReplicaN = 1

	// HttpPusher Pushing monitoring metric data through HTTP
	HttpPusher = "http"
	// FilePusher Save the monitoring metric data to file
	FilePusher     = "file"
	DefaultPushers = ""
	PusherSep      = "|"
)
View Source
const (
	Second = toml.Duration(time.Second)

	MinRecvWindowSize          = 2
	MinConcurrentAcceptSession = 1024
	MinOpenSessionTimeout      = 60 * Second
	MinSessionSelectTimeout    = 60 * Second
	MinTCPDialTimeout          = Second
	MinConnPoolSize            = 2

	DefaultRecvWindowSize          = 8
	DefaultConcurrentAcceptSession = 4096
	DefaultOpenSessionTimeout      = 300 * Second
	DefaultSessionSelectTimeout    = 300 * Second
	DefaultTCPDialTimeout          = Second
	DefaultConnPoolSize            = 4
)
View Source
const (
	// DefaultWriteTimeout is the default timeout for a complete write to succeed.
	DefaultWriteTimeout = 10 * time.Second
	DefaultQueryTimeout = 0

	// DefaultShardWriterTimeout is the default timeout set on shard writers.
	DefaultShardWriterTimeout = 10 * time.Second

	// DefaultShardMapperTimeout is the default timeout set on shard mappers.
	DefaultShardMapperTimeout = 10 * time.Second

	// DefaultMaxConcurrentQueries is the maximum number of running queries.
	// A value of zero will make the maximum query limit unlimited.
	DefaultMaxConcurrentQueries = 0

	// DefaultMaxQueryMem is the is the maximum size a query cache can reach before it starts stopping a query.
	DefaultMaxQueryMem = 0

	DefaultMetaExecutorWriteTimeout = 5 * time.Second
	DefaultQueryLimitIntervalTime   = 10
	DefaultQueryLimitLevel          = 0
	DefaultQueryLimitFlag           = false
	DefaultShardTier                = "warm"
	DefaultForceBroadcastQuery      = false
	DefaultRetentionPolicyLimit     = 100
)
View Source
const (
	EngineType1                         = "tssp1"
	EngineType2                         = "tssp2"
	DefaultEngine                       = "tssp1"
	DefaultImmutableMaxMemoryPercent    = 10
	DefaultCompactFullWriteColdDuration = time.Duration(1 * time.Hour)

	KB = 1024
	MB = 1024 * 1024
	GB = 1024 * 1024 * 1024

	// DefaultMaxConcurrentCompactions is the maximum number of concurrent full and level compactions
	// that can run at one time.  A value of 0 results in 50% of runtime.GOMAXPROCS(0) used at runtime.
	DefaultMaxConcurrentCompactions = 0

	DefaultWriteColdDuration = time.Duration(5 * time.Second)
	Is32BitPtr               = (^uintptr(0) >> 32) == 0

	DefaultSnapshotThroughput      = 48 * MB
	DefaultSnapshotThroughputBurst = 64 * MB
	DefaultMaxWriteHangTime        = 15 * time.Second
	DefaultWALSyncInterval         = 100 * time.Millisecond
)

Variables

This section is empty.

Functions

func CombineDomain added in v0.2.0

func CombineDomain(domain, addr string) string

func FormatSpdy

func FormatSpdy(cfg *Spdy)

func Parse

func Parse(conf Config, path string) error

Types

type App

type App string
const (
	AppSql     App = "sql"
	AppStore   App = "store"
	AppMeta    App = "meta"
	AppSingle  App = "single"
	AppMonitor App = "monitor"
)

type Castor added in v0.2.0

type Castor struct {
	Enabled           bool       `toml:"enabled"`
	PyWorkerAddr      []string   `toml:"pyworker-addr"`
	ConnPoolSize      int        `toml:"connect-pool-size"`
	ResultWaitTimeout int        `toml:"result-wait-timeout"`
	FitDetect         algoConfig `toml:"fit_detect"`
	Detect            algoConfig `toml:"detect"`
	Predict           algoConfig `toml:"predict"`
	Fit               algoConfig `toml:"fit"`
}

func NewCastor added in v0.2.0

func NewCastor() Castor

func (*Castor) ApplyEnvOverrides added in v0.2.0

func (c *Castor) ApplyEnvOverrides(_ func(string) string) error

func (*Castor) CheckAlgoAndConfExistence added in v0.2.0

func (c *Castor) CheckAlgoAndConfExistence(algo, conf, algorithmType string) *errno.Error

func (*Castor) GetWaitTimeout added in v0.2.0

func (c *Castor) GetWaitTimeout() time.Duration

func (Castor) Validate added in v0.2.0

func (c Castor) Validate() error

type CertValidator

type CertValidator struct {
	// contains filtered or unexported fields
}

func NewCertValidator

func NewCertValidator(certFile, keyFile string) *CertValidator

func (*CertValidator) Validate

func (c *CertValidator) Validate() error

type Common

type Common struct {
	MetaJoin  []string `toml:"meta-join"`
	ClusterID string   `toml:"cluster-id"`
	CPUNum    int      `toml:"cpu-num"`

	MemorySize      itoml.Size     `toml:"memory-size"`
	MemoryLimitSize itoml.Size     `toml:"executor-memory-size-limit"`
	MemoryWaitTime  itoml.Duration `toml:"executor-memory-wait-time"`
}

Common represents the CommonConfiguration format for the influxd binary.

func NewCommon

func NewCommon() *Common

NewCommon builds a new CommonConfiguration with default values.

func (*Common) ApplyEnvOverrides

func (c *Common) ApplyEnvOverrides(fn func(string) string) error

ApplyEnvOverrides apply the environment CommonConfiguration on top of the CommonConfig.

func (*Common) Corrector

func (c *Common) Corrector()

func (*Common) GetLogging

func (c *Common) GetLogging() *Logger

func (Common) Validate

func (c Common) Validate() error

Validate returns an error if the CommonConfig is invalid.

type Config

type Config interface {
	ApplyEnvOverrides(func(string) string) error
	Validate() error
	GetLogging() *Logger
	GetSpdy() *Spdy
	GetCommon() *Common
}

type Coordinator

type Coordinator struct {
	WriteTimeout         toml.Duration `toml:"write-timeout"`
	MaxConcurrentQueries int           `toml:"max-concurrent-queries"`
	QueryTimeout         toml.Duration `toml:"query-timeout"`
	LogQueriesAfter      toml.Duration `toml:"log-queries-after"`
	ShardWriterTimeout   toml.Duration `toml:"shard-writer-timeout"`
	ShardMapperTimeout   toml.Duration `toml:"shard-mapper-timeout"`
	// Maximum number of memory bytes to use from the query
	MaxQueryMem              toml.Size     `toml:"max-query-mem"`
	MetaExecutorWriteTimeout toml.Duration `toml:"meta-executor-write-timeout"`
	QueryLimitIntervalTime   int           `toml:"query-limit-interval-time"`
	QueryLimitLevel          int           `toml:"query-limit-level"`
	RetentionPolicyLimit     int           `toml:"rp-limit"`
	ShardTier                string        `toml:"shard-tier"`

	QueryLimitFlag          bool `toml:"query-limit-flag"`
	QueryTimeCompareEnabled bool `toml:"query-time-compare-enabled"`
	ForceBroadcastQuery     bool `toml:"force-broadcast-query"`
}

Coordinator represents the configuration for the coordinator service.

func NewCoordinator

func NewCoordinator() Coordinator

NewCoordinator returns an instance of Config with defaults.

func (Coordinator) Validate

func (c Coordinator) Validate() error

Validate validates that the configuration is acceptable.

type Gossip

type Gossip struct {
	Enabled       bool          `toml:"enabled"`
	LogEnabled    bool          `toml:"log-enabled"`
	BindAddr      string        `toml:"bind-address"`
	MetaBindPort  int           `toml:"meta-bind-port"`
	StoreBindPort int           `toml:"store-bind-port"`
	ProbInterval  toml.Duration `toml:"prob-interval"`
	SuspicionMult int           `toml:"suspicion-mult"`
	Members       []string      `toml:"members"`
}

func NewGossip

func NewGossip() *Gossip

func (*Gossip) BuildSerf

func (c *Gossip) BuildSerf(lg Logger, app App, name string, event chan<- serf.Event) *serf.Config

func (Gossip) Validate

func (c Gossip) Validate() error

type Logger

type Logger struct {
	Format          string        `toml:"format"`
	Level           zapcore.Level `toml:"level"`
	MaxSize         toml.Size     `toml:"max-size"`
	MaxNum          int           `toml:"max-num"`
	MaxAge          int           `toml:"max-age"`
	CompressEnabled bool          `toml:"compress-enabled"`
	Path            string        `toml:"path"`
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(app App) Logger

NewLogger returns a new instance of Config with defaults.

func (*Logger) Build

func (c *Logger) Build(name string) *lumberjack.Logger

func (*Logger) GetFileName

func (c *Logger) GetFileName() string

func (*Logger) SetApp

func (c *Logger) SetApp(app App)

func (Logger) Validate

func (c Logger) Validate() error

Validate validates that the configuration is acceptable.

type Meta

type Meta struct {
	HTTPSEnabled        bool `toml:"https-enabled"`
	PprofEnabled        bool `toml:"pprof-enabled"`
	RetentionAutoCreate bool `toml:"retention-autocreate"`
	ClusterTracing      bool `toml:"cluster-tracing"`
	LoggingEnabled      bool `toml:"logging-enabled"`
	BatchApplyCh        bool `toml:"batch-enabled"`

	Domain                  string  `toml:"domain"`
	Dir                     string  `toml:"dir"`
	HTTPBindAddress         string  `toml:"http-bind-address"`
	RPCBindAddress          string  `toml:"rpc-bind-address"`
	BindAddress             string  `toml:"bind-address"`
	HTTPSCertificate        string  `toml:"https-certificate"`
	HTTPSPrivateKey         string  `toml:"https-private-key"`
	MaxConcurrentWriteLimit int     `toml:"-"`
	Version                 int     `toml:"meta-version"`
	Hostname                string  `toml:"hostname"`
	SplitRowThreshold       uint64  `toml:"split-row-threshold"`
	ImbalanceFactor         float64 `toml:"imbalance-factor"`
	RaftStore               string  `toml:"raft-store"`
	RemoteHostname          string

	JoinPeers          []string
	ElectionTimeout    toml.Duration `toml:"election-timeout"`
	HeartbeatTimeout   toml.Duration `toml:"heartbeat-timeout"`
	LeaderLeaseTimeout toml.Duration `toml:"leader-lease-timeout"`
	CommitTimeout      toml.Duration `toml:"commit-timeout"`
	LeaseDuration      toml.Duration `toml:"lease-duration"`
	Logging            Logger        `toml:"logging"`
}

Meta represents the meta configuration.

func NewMeta

func NewMeta() *Meta

NewMeta builds a new configuration with default values.

func (*Meta) ApplyEnvOverrides

func (c *Meta) ApplyEnvOverrides(fn func(string) string) error

func (*Meta) BuildRaft

func (c *Meta) BuildRaft() *raft.Config

func (*Meta) CombineDomain added in v0.2.0

func (c *Meta) CombineDomain(addr string) string

func (*Meta) Validate

func (c *Meta) Validate() error

type Monitor

type Monitor struct {
	Pushers       string        `toml:"pushers"`
	StoreEnabled  bool          `toml:"store-enabled"`
	StoreDatabase string        `toml:"store-database"`
	StoreInterval toml.Duration `toml:"store-interval"`
	StorePath     string        `toml:"store-path"`
	Compress      bool          `toml:"compress"`
	HttpsEnabled  bool          `toml:"https-enabled"`
	HttpAuth      []string      `toml:"http-auth"`
	HttpEndPoint  string        `toml:"http-endpoint"`
	// contains filtered or unexported fields
}

Monitor represents the configuration for the monitor service.

func NewMonitor

func NewMonitor(app App) Monitor

func (*Monitor) GetApp

func (c *Monitor) GetApp() App

func (*Monitor) SetApp

func (c *Monitor) SetApp(app App)

func (Monitor) Validate

func (c Monitor) Validate() error

Validate validates that the configuration is acceptable.

type MonitorMain

type MonitorMain struct {
	Host        string `toml:"host"`
	MetricPath  string `toml:"metric-path"`
	ErrLogPath  string `toml:"error-log-path"`
	Process     string `toml:"process"`
	DiskPath    string `toml:"disk-path"`
	AuxDiskPath string `toml:"aux-disk-path"`
	History     string `toml:"history-file"`
	Compress    bool   `toml:"compress"`
}

type MonitorQuery

type MonitorQuery struct {
	QueryEnable   bool          `toml:"query-enable"`
	HttpEndpoint  string        `toml:"http-endpoint"`
	QueryInterval toml.Duration `toml:"query-interval"`
}

type MonitorReport

type MonitorReport struct {
	Address    string        `toml:"address"`
	Database   string        `toml:"database"`
	Rp         string        `toml:"rp"`
	RpDuration toml.Duration `toml:"rp-duration"`
}

type Spdy

type Spdy struct {
	ByteBufferPoolDefaultSize uint64

	RecvWindowSize          int `toml:"recv-window-size"`
	ConcurrentAcceptSession int `toml:"concurrent-accept-session"`
	ConnPoolSize            int `toml:"conn-pool-size"`

	OpenSessionTimeout   toml.Duration `toml:"open-session-timeout"`
	SessionSelectTimeout toml.Duration `toml:"session-select-timeout"`
	TCPDialTimeout       toml.Duration `toml:"tcp-dial-timeout"`
	DataAckTimeout       toml.Duration `toml:"data-ack-timeout"`

	TLSEnable             bool   `toml:"tls-enable"`
	TLSClientAuth         bool   `toml:"tls-client-auth"`
	TLSInsecureSkipVerify bool   `toml:"tls-insecure-skip-verify"`
	TLSCertificate        string `toml:"tls-certificate"`
	TLSPrivateKey         string `toml:"tls-private-key"`
	TLSClientCertificate  string `toml:"tls-client-certificate"`
	TLSClientPrivateKey   string `toml:"tls-client-private-key"`
	TLSCARoot             string `toml:"tls-ca-root"`
	TLSServerName         string `toml:"tls-server-name"`
}

func NewSpdy

func NewSpdy() Spdy

func (*Spdy) ApplyEnvOverrides

func (c *Spdy) ApplyEnvOverrides(_ func(string) string) error

func (*Spdy) GetOpenSessionTimeout

func (c *Spdy) GetOpenSessionTimeout() time.Duration

func (*Spdy) GetSessionSelectTimeout

func (c *Spdy) GetSessionSelectTimeout() time.Duration

func (*Spdy) GetTCPDialTimeout

func (c *Spdy) GetTCPDialTimeout() time.Duration

func (*Spdy) NewClientTLSConfig

func (c *Spdy) NewClientTLSConfig() (*tls.Config, error)

func (*Spdy) NewTLSConfig

func (c *Spdy) NewTLSConfig() (*tls.Config, error)

func (Spdy) Validate

func (c Spdy) Validate() error

type Store

type Store struct {
	IngesterAddress string `toml:"store-ingest-addr"`
	SelectAddress   string `toml:"store-select-addr"`
	DataDir         string `toml:"store-data-dir"`
	Domain          string `toml:"domain"`
	WALDir          string `toml:"store-wal-dir"`
	MetaDir         string `toml:"store-meta-dir"`
	Engine          string `toml:"engine-type"`
	Index           string `toml:"index-version"`

	// The max inmem percent of immutable
	ImmTableMaxMemoryPercentage int `toml:"imm-table-max-memory-percentage"`

	// Compaction options for tssp1 (descriptions above with defaults)
	CompactFullWriteColdDuration toml.Duration `toml:"compact-full-write-cold-duration"`
	MaxConcurrentCompactions     int           `toml:"max-concurrent-compactions"`
	MaxFullCompactions           int           `toml:"max-full-compactions"`
	CompactThroughput            toml.Size     `toml:"compact-throughput"`
	CompactThroughputBurst       toml.Size     `toml:"compact-throughput-burst"`
	SnapshotThroughput           toml.Size     `toml:"snapshot-throughput"`
	SnapshotThroughputBurst      toml.Size     `toml:"snapshot-throughput-burst"`
	CompactionMethod             int           `toml:"compaction-method"` // 0:auto, 1: streaming, 2: non-streaming

	// Configs for snapshot
	WriteColdDuration     toml.Duration `toml:"write-cold-duration"`
	ShardMutableSizeLimit toml.Size     `toml:"shard-mutable-size-limit"`
	NodeMutableSizeLimit  toml.Size     `toml:"node-mutable-size-limit"`
	MaxWriteHangTime      toml.Duration `toml:"max-write-hang-time"`
	WalSyncInterval       toml.Duration `toml:"wal-sync-interval"`

	WalEnabled        bool `toml:"wal-enabled"`
	WalReplayParallel bool `toml:"wal-replay-parallel"`
	CacheDataBlock    bool `toml:"cache-table-data-block"`
	CacheMetaBlock    bool `toml:"cache-table-meta-block"`
	EnableMmapRead    bool `toml:"enable-mmap-read"`
	Readonly          bool `toml:"readonly"`
	CompactRecovery   bool `toml:"compact-recovery"`

	ReadCacheLimit       int `toml:"read-cache-limit"`
	WriteConcurrentLimit int `toml:"write-concurrent-limit"`
}

Store is the configuration for the engine.

func NewStore

func NewStore() Store

NewStore returns the default configuration for tsdb.

func (*Store) Corrector

func (c *Store) Corrector(cpuNum int, memorySize toml.Size)

func (*Store) InsertAddr added in v0.2.0

func (c *Store) InsertAddr() string

func (*Store) SelectAddr added in v0.2.0

func (c *Store) SelectAddr() string

func (Store) Validate

func (c Store) Validate() error

Validate validates the configuration hold by c.

func (Store) ValidateEngine

func (c Store) ValidateEngine(engines []string) error

type TSMeta

type TSMeta struct {
	Common  Common  `toml:"common"`
	Meta    *Meta   `toml:"meta"`
	Logging Logger  `toml:"logging"`
	Monitor Monitor `toml:"monitor"`
	Gossip  *Gossip `toml:"gossip"`
	Spdy    Spdy    `toml:"spdy"`

	// TLS provides configuration options for all https endpoints.
	TLS tlsconfig.Config `toml:"tls"`
}

TSMeta represents the configuration format for the ts-meta binary.

func NewTSMeta

func NewTSMeta() *TSMeta

NewTSMeta returns an instance of TSMeta with reasonable defaults.

func (*TSMeta) ApplyEnvOverrides

func (c *TSMeta) ApplyEnvOverrides(func(string) string) error

ApplyEnvOverrides apply the environment configuration on top of the config.

func (*TSMeta) GetCommon

func (c *TSMeta) GetCommon() *Common

func (*TSMeta) GetLogging

func (c *TSMeta) GetLogging() *Logger

func (*TSMeta) GetSpdy

func (c *TSMeta) GetSpdy() *Spdy

func (*TSMeta) Validate

func (c *TSMeta) Validate() error

Validate returns an error if the config is invalid.

type TSMonitor

type TSMonitor struct {
	MonitorConfig MonitorMain   `toml:"monitor"`
	QueryConfig   MonitorQuery  `toml:"query"`
	ReportConfig  MonitorReport `toml:"report"`
	Logging       Logger        `toml:"logging"`
}

TSMonitor represents the configuration format for the ts-meta binary.

func NewTSMonitor

func NewTSMonitor() *TSMonitor

NewTSMonitor returns an instance of Config with reasonable defaults.

func (*TSMonitor) ApplyEnvOverrides

func (c *TSMonitor) ApplyEnvOverrides(getenv func(string) string) error

ApplyEnvOverrides apply the environment configuration on top of the config.

func (*TSMonitor) GetCommon

func (c *TSMonitor) GetCommon() *Common

func (*TSMonitor) GetLogging

func (c *TSMonitor) GetLogging() *Logger

func (*TSMonitor) GetSpdy

func (c *TSMonitor) GetSpdy() *Spdy

func (*TSMonitor) Validate

func (c *TSMonitor) Validate() error

Validate returns an error if the config is invalid.

type TSSql

type TSSql struct {
	Common      *Common     `toml:"common"`
	Coordinator Coordinator `toml:"coordinator"`
	Monitor     Monitor     `toml:"monitor"`
	Logging     Logger      `toml:"logging"`
	Spdy        Spdy        `toml:"spdy"`

	HTTP httpdConfig.Config `toml:"http"`

	// TLS provides configuration options for all https endpoints.
	TLS      tlsconfig.Config `toml:"tls"`
	Analysis Castor           `toml:"castor"`
}

TSSql represents the configuration format for the TSSql binary.

func NewTSSql

func NewTSSql() *TSSql

NewTSSql returns an instance of Config with reasonable defaults.

func (*TSSql) ApplyEnvOverrides

func (c *TSSql) ApplyEnvOverrides(fn func(string) string) error

ApplyEnvOverrides apply the environment configuration on top of the config.

func (*TSSql) GetCommon

func (c *TSSql) GetCommon() *Common

func (*TSSql) GetLogging

func (c *TSSql) GetLogging() *Logger

func (*TSSql) GetSpdy

func (c *TSSql) GetSpdy() *Spdy

func (*TSSql) Validate

func (c *TSSql) Validate() error

Validate returns an error if the config is invalid.

type TSStore

type TSStore struct {
	Common      *Common     `toml:"common"`
	Data        Store       `toml:"data"`
	Coordinator Coordinator `toml:"coordinator"`
	Monitor     Monitor     `toml:"monitor"`
	Logging     Logger      `toml:"logging"`
	Gossip      *Gossip     `toml:"gossip"`
	Spdy        Spdy        `toml:"spdy"`

	HTTPD             httpdConf.Config `toml:"http"`
	Retention         retention.Config `toml:"retention"`
	HierarchicalStore retention.Config `toml:"hierarchical-storage"`

	// TLS provides configuration options for all https endpoints.
	TLS      tlsconfig.Config `toml:"tls"`
	Analysis Castor           `toml:"castor"`
}

TSStore represents the configuration format for the influxd binary.

func NewTSStore

func NewTSStore() *TSStore

NewTSStore returns an instance of Config with reasonable defaults.

func (*TSStore) ApplyEnvOverrides

func (c *TSStore) ApplyEnvOverrides(fn func(string) string) error

ApplyEnvOverrides apply the environment configuration on top of the config.

func (*TSStore) GetCommon

func (c *TSStore) GetCommon() *Common

func (*TSStore) GetLogging

func (c *TSStore) GetLogging() *Logger

func (*TSStore) GetSpdy

func (c *TSStore) GetSpdy() *Spdy

func (*TSStore) Validate

func (c *TSStore) Validate() error

Validate returns an error if the config is invalid.

type Validator

type Validator interface {
	Validate() error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL