common

package
v0.0.0-...-e951c9a Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: AGPL-3.0 Imports: 12 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").
	// If an interface does not have a private IP address it is filtered out, falling back to "eth0" and "en0" if none are left.
	InstanceInterfaceNames []string `yaml:"instance_interface_names" doc:"default=[<private network interfaces>]"`

	// 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"`

	// CompactorAddress is the http address of the compactor in the form http://host:port
	CompactorAddress string `yaml:"compactor_address"`

	// Global embedded-cache config. Independent of what type of cache, we need some singleton configs like Ring configuration when running in distributed fashion.
	EmbeddedCacheConfig cache.EmbeddedCacheSingletonConfig `yaml:"embedded_cache"`
}

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(f *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"`
	BOS      baidubce.BOSStorageConfig `yaml:"bos"`
	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