app

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Addr                  string        `env:"ADDR, required, report"`
	IngressAddr           string        `env:"INGRESS_ADDR, required, report"`
	InternodeAddr         string        `env:"INTERNODE_ADDR, required, report"`
	HealthPort            int           `env:"HEALTH_PORT, report"`
	StoragePath           string        `env:"STORAGE_PATH, report"`
	RetentionPeriodInDays uint          `env:"RETENTION_PERIOD_IN_DAYS, report"`
	RetentionPeriod       time.Duration `env:"-, report"`
	DiskFreePercentTarget uint          `env:"DISK_FREE_PERCENT_TARGET, report"`
	ReplicationFactor     uint          `env:"REPLICATION_FACTOR, report"`
	LabelTruncationLength uint          `env:"LABEL_TRUNCATION_LENGTH, report"`
	QueryTimeout          time.Duration `env:"QUERY_TIMEOUT, report"`

	// NodeIndex determines what data the node stores. It splits up the range
	// of 0 - 18446744073709551615 evenly. If data falls out of range of the
	// given node, it will be routed to theh correct one.
	NodeIndex int `env:"NODE_INDEX, report"`

	// NodeAddrs are all the MetricStore addresses (including the current
	// address). They are in order according to their NodeIndex.
	//
	// If NodeAddrs is emptpy or size 1, then data is not routed as it is
	// assumed that the current node is the only one.
	NodeAddrs []string `env:"NODE_ADDRS, report"`

	// InternodeAddrs are all the internode addresses (including the current
	// address). They are in order according to their NodeIndex.
	//
	// If InternodeAddrs is emptpy or size 1, then data is not routed as it is
	// assumed that the current node is the only one.
	InternodeAddrs []string `env:"INTERNODE_ADDRS, report"`

	TLS                     sharedtls.TLS
	MetricStoreServerTLS    MetricStoreServerTLS
	MetricStoreInternodeTLS MetricStoreInternodeTLS
	MetricStoreMetricsTLS   MetricStoreMetricsTLS

	RulesPath        string `env:"RULES_PATH, report"`
	ScrapeConfigPath string `env:"SCRAPE_CONFIG_PATH, report"`
	AlertmanagerAddr string `env:"ALERTMANAGER_ADDR, report"`

	LogLevel string `env:"LOG_LEVEL, report"`
}

Config is the configuration for a MetricStore.

func LoadConfig

func LoadConfig() *Config

LoadConfig creates Config object from environment variables

type MetricStoreApp

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

func NewMetricStoreApp

func NewMetricStoreApp(cfg *Config, log *logger.Logger) *MetricStoreApp

func (*MetricStoreApp) DebugAddr

func (c *MetricStoreApp) DebugAddr() string

DebugAddr returns the address (host and port) that the debug server is bound to. If the debug server has not been started an empty string will be returned.

func (*MetricStoreApp) Run

func (m *MetricStoreApp) Run()

Run starts the CFAuthProxyApp, this is a blocking method call.

func (*MetricStoreApp) Stop

func (m *MetricStoreApp) Stop()

Stop stops all the subprocesses for the application.

type MetricStoreInternodeTLS added in v1.3.0

type MetricStoreInternodeTLS struct {
	CAPath   string `env:"METRIC_STORE_INTERNODE_CA_PATH, required, report"`
	CertPath string `env:"METRIC_STORE_INTERNODE_CERT_PATH, required, report"`
	KeyPath  string `env:"METRIC_STORE_INTERNODE_KEY_PATH, required, report"`
}

type MetricStoreMetricsTLS added in v1.3.0

type MetricStoreMetricsTLS struct {
	CAPath   string `env:"METRIC_STORE_METRICS_CA_PATH, required, report"`
	CertPath string `env:"METRIC_STORE_METRICS_CERT_PATH, required, report"`
	KeyPath  string `env:"METRIC_STORE_METRICS_KEY_PATH, required, report"`
}

type MetricStoreServerTLS

type MetricStoreServerTLS struct {
	CAPath   string `env:"METRIC_STORE_SERVER_CA_PATH, required, report"`
	CertPath string `env:"METRIC_STORE_SERVER_CERT_PATH, required, report"`
	KeyPath  string `env:"METRIC_STORE_SERVER_KEY_PATH, required, report"`
}

Jump to

Keyboard shortcuts

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