Help us shape the future of Go! Take the 2026 Go Developer Survey

common

package
v2.4.3 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: AGPL-3.0 Imports: 8 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 {
	PathPrefix        string          `yaml:"path_prefix"`
	Storage           Storage         `yaml:"storage"`
	PersistTokens     bool            `yaml:"persist_tokens"`
	ReplicationFactor int             `yaml:"replication_factor"`
	Ring              util.RingConfig `yaml:"ring"`

	// InstanceInterfaceNames represents a common list of net interfaces used to look for host addresses.
	//
	// Internally, addresses will be resolved in the order that this is configured.
	// By default, the list of used interfaces are, in order: "eth0", "en0", and your loopback net interface (probably "lo").
	InstanceInterfaceNames []string `yaml:"instance_interface_names"`

	// InstanceAddr represents a common ip used by instances to advertise their address.
	//
	// For instance, the different Loki rings will have this stored in its key-value store to be later retrieved by other components.
	// You can check this during Loki execution under ring status pages (ex: `/ring` will output the address of the different ingester
	// instances).
	InstanceAddr string `yaml:"instance_addr"`
}

Config holds common config that can be shared between multiple other config sections.

Values defined under this common configuration are supersede if a more specific value is defined.

func (*Config) RegisterFlags

func (c *Config) RegisterFlags(_ *flag.FlagSet)

type FilesystemConfig

type FilesystemConfig struct {
	ChunksDirectory string `yaml:"chunks_directory"`
	RulesDirectory  string `yaml:"rules_directory"`
}

func (*FilesystemConfig) RegisterFlagsWithPrefix

func (cfg *FilesystemConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)

type Storage

type Storage struct {
	S3       aws.S3Config            `yaml:"s3"`
	GCS      gcp.GCSConfig           `yaml:"gcs"`
	Azure    azure.BlobStorageConfig `yaml:"azure"`
	Swift    openstack.SwiftConfig   `yaml:"swift"`
	FSConfig FilesystemConfig        `yaml:"filesystem"`
	Hedging  hedging.Config          `yaml:"hedging"`
}

func (*Storage) RegisterFlagsWithPrefix

func (s *Storage) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)

Jump to

Keyboard shortcuts

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