app

package
v0.0.0-...-39c03fc Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: AGPL-3.0 Imports: 61 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Ring                 string = "ring"
	TPRing               string = "tp-ring"
	MetricsGeneratorRing string = "metrics-generator-ring"
	Overrides            string = "overrides"
	Server               string = "server"
	InternalServer       string = "internal-server"
	Distributor          string = "distributor"
	Ingester             string = "ingester"
	TracepointClient     string = "tracepoint-client"
	Tracepoint           string = "tracepoint"
	TracepointAPI        string = "tracepoint-api"
	MetricsGenerator     string = "metrics-generator"
	Querier              string = "querier"
	QueryFrontend        string = "query-frontend"
	Compactor            string = "compactor"
	Store                string = "store"
	MemberlistKV         string = "memberlist-kv"
	SingleBinary         string = "all"
	ScalableSingleBinary string = "scalable-single-binary"
	UsageReport          string = "usage-report"
)

The various modules that make up deep.

Variables

This section is empty.

Functions

func DisableSignalHandling

func DisableSignalHandling(config *server.Config)

DisableSignalHandling puts a dummy signal handler

func NewServerService

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

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. N.B.: this function is NOT Cortex specific, please let's keep it that way. Passed server should not react on signals. Early return from Run function is considered to be an error.

Types

type App

type App struct {
	Server         *server.Server
	InternalServer *server.Server

	MemberlistKV *memberlist.KVInitService

	HTTPAuthMiddleware middleware.Interface
	ReceiverMiddleware receiver.Middleware

	ModuleManager *modules.Manager
	// contains filtered or unexported fields
}

App is the root datastructure.

func New

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

New makes a new app.

func (*App) Run

func (t *App) Run() error

Run starts, and blocks until a signal is received.

type Config

type Config struct {
	Target                 string `yaml:"target,omitempty"`
	AuthEnabled            bool   `yaml:"auth_enabled,omitempty"`
	MultitenancyEnabled    bool   `yaml:"multitenancy_enabled,omitempty"`
	HTTPAPIPrefix          string `yaml:"http_api_prefix"`
	UseOTelTracer          bool   `yaml:"use_otel_tracer,omitempty"`
	EnableGoRuntimeMetrics bool   `yaml:"enable_go_runtime_metrics,omitempty"`

	Server          server.Config           `yaml:"server,omitempty"`
	InternalServer  internalserver.Config   `yaml:"internal_server,omitempty"`
	Distributor     distributor.Config      `yaml:"distributor,omitempty"`
	IngesterClient  ingester_client.Config  `yaml:"ingester_client,omitempty"`
	GeneratorClient generator_client.Config `yaml:"metrics_generator_client,omitempty"`
	Querier         querier.Config          `yaml:"querier,omitempty"`
	Frontend        frontend.Config         `yaml:"query_frontend,omitempty"`
	Compactor       compactor.Config        `yaml:"compactor,omitempty"`
	Ingester        ingester.Config         `yaml:"ingester,omitempty"`
	Tracepoint      tracepoint.Config       `yaml:"tracepoint,omitempty"`
	Generator       generator.Config        `yaml:"metrics_generator,omitempty"`
	StorageConfig   storage.Config          `yaml:"storage,omitempty"`
	LimitsConfig    overrides.Limits        `yaml:"overrides,omitempty"`
	MemberlistKV    memberlist.KVConfig     `yaml:"memberlist,omitempty"`
	UsageReport     usagestats.Config       `yaml:"usage_report,omitempty"`
}

Config is the root config for App.

func (*Config) CheckConfig

func (c *Config) CheckConfig() []ConfigWarning

CheckConfig checks if config values are suspect and returns a bundled list of warnings and explanation.

func (*Config) Collect

func (c *Config) Collect(ch chan<- prometheus.Metric)

func (*Config) Describe

func (c *Config) Describe(ch chan<- *prometheus.Desc)

func (*Config) MultitenancyIsEnabled

func (c *Config) MultitenancyIsEnabled() bool

MultitenancyIsEnabled checks if multitenancy is enabled

func (*Config) RegisterFlagsAndApplyDefaults

func (c *Config) RegisterFlagsAndApplyDefaults(prefix string, f *flag.FlagSet)

RegisterFlagsAndApplyDefaults registers flag.

type ConfigWarning

type ConfigWarning struct {
	Message string
	Explain string
}

ConfigWarning bundles message and explanation strings in one structure.

Jump to

Keyboard shortcuts

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