cortex

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: Apache-2.0 Imports: 53 Imported by: 9

Documentation

Index

Constants

View Source
const (
	Ring moduleName = iota
	RuntimeConfig
	Overrides
	Server
	Distributor
	Ingester
	Querier
	StoreQueryable
	QueryFrontend
	Store
	TableManager
	Ruler
	Configs
	AlertManager
	Compactor
	MemberlistKV
	DataPurger
	All
)

The various modules that make up Cortex.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Target      moduleName `yaml:"target,omitempty"`
	AuthEnabled bool       `yaml:"auth_enabled,omitempty"`
	PrintConfig bool       `yaml:"-"`
	HTTPPrefix  string     `yaml:"http_prefix"`

	Server           server.Config            `yaml:"server,omitempty"`
	Distributor      distributor.Config       `yaml:"distributor,omitempty"`
	Querier          querier.Config           `yaml:"querier,omitempty"`
	IngesterClient   client.Config            `yaml:"ingester_client,omitempty"`
	Ingester         ingester.Config          `yaml:"ingester,omitempty"`
	Storage          storage.Config           `yaml:"storage,omitempty"`
	ChunkStore       chunk.StoreConfig        `yaml:"chunk_store,omitempty"`
	Schema           chunk.SchemaConfig       `yaml:"schema,omitempty" doc:"hidden"` // Doc generation tool doesn't support it because part of the SchemaConfig doesn't support CLI flags (needs manual documentation)
	LimitsConfig     validation.Limits        `yaml:"limits,omitempty"`
	Prealloc         client.PreallocConfig    `yaml:"prealloc,omitempty" doc:"hidden"`
	Worker           frontend.WorkerConfig    `yaml:"frontend_worker,omitempty"`
	Frontend         frontend.Config          `yaml:"frontend,omitempty"`
	QueryRange       queryrange.Config        `yaml:"query_range,omitempty"`
	TableManager     chunk.TableManagerConfig `yaml:"table_manager,omitempty"`
	Encoding         encoding.Config          `yaml:"-"` // No yaml for this, it only works with flags.
	TSDB             tsdb.Config              `yaml:"tsdb"`
	Compactor        compactor.Config         `yaml:"compactor,omitempty"`
	DataPurgerConfig purger.Config            `yaml:"purger,omitempty"`

	Ruler         ruler.Config                               `yaml:"ruler,omitempty"`
	Configs       configs.Config                             `yaml:"configs,omitempty"`
	Alertmanager  alertmanager.MultitenantAlertmanagerConfig `yaml:"alertmanager,omitempty"`
	RuntimeConfig runtimeconfig.ManagerConfig                `yaml:"runtime_config,omitempty"`
	MemberlistKV  memberlist.KVConfig                        `yaml:"memberlist"`
}

Config is the root config for Cortex.

func (*Config) RegisterFlags

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

RegisterFlags registers flag.

func (*Config) Validate added in v0.4.0

func (c *Config) Validate(log log.Logger) error

Validate the cortex config and returns an error if the validation doesn't pass

type Cortex

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

Cortex is the root datastructure for Cortex.

func New

func New(cfg Config) (*Cortex, error)

New makes a new Cortex.

func (*Cortex) Run

func (t *Cortex) Run() error

Run starts Cortex running, and blocks until a Cortex stops.

type ServerService added in v0.7.0

type ServerService struct {
	services.Service
	// contains filtered or unexported fields
}

func NewServerService added in v0.7.0

func NewServerService(cfg *Config, serv *server.Server, servicesToWaitFor func() []services.Service) *ServerService

NewServerService constructs service from Server component. servicesToWaitFor is called when server is stopping, and should return all services that need to terminate before server actually stops.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳