Documentation
¶
Index ¶
Constants ¶
const (
Ring string = "ring"
RuntimeConfig string = "runtime-config"
Overrides string = "overrides"
OverridesExporter string = "overrides-exporter"
TenantConfigs string = "tenant-configs"
Server string = "server"
Distributor string = "distributor"
Ingester string = "ingester"
Querier string = "querier"
IngesterQuerier string = "ingester-querier"
QueryFrontend string = "query-frontend"
QueryFrontendTripperware string = "query-frontend-tripperware"
RulerStorage string = "ruler-storage"
Ruler string = "ruler"
Store string = "store"
TableManager string = "table-manager"
MemberlistKV string = "memberlist-kv"
Compactor string = "compactor"
IndexGateway string = "index-gateway"
QueryScheduler string = "query-scheduler"
All string = "all"
Read string = "read"
Write string = "write"
UsageReport string = "usage-report"
)
The various modules that make up Loki.
Variables ¶
var ErrTooManyStorageConfigs = errors.New("too many storage configs provided in the common config, please only define one storage backend")
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 Config ¶
type Config struct {
Target flagext.StringSliceCSV `yaml:"target,omitempty"`
AuthEnabled bool `yaml:"auth_enabled,omitempty"`
HTTPPrefix string `yaml:"http_prefix"`
BallastBytes int `yaml:"ballast_bytes"`
Common common.Config `yaml:"common,omitempty"`
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"`
StorageConfig storage.Config `yaml:"storage_config,omitempty"`
ChunkStoreConfig storage.ChunkStoreConfig `yaml:"chunk_store_config,omitempty"`
SchemaConfig storage.SchemaConfig `yaml:"schema_config,omitempty"`
LimitsConfig validation.Limits `yaml:"limits_config,omitempty"`
TableManager chunk.TableManagerConfig `yaml:"table_manager,omitempty"`
Worker worker.Config `yaml:"frontend_worker,omitempty"`
Frontend lokifrontend.Config `yaml:"frontend,omitempty"`
Ruler ruler.Config `yaml:"ruler,omitempty"`
QueryRange queryrange.Config `yaml:"query_range,omitempty"`
RuntimeConfig runtimeconfig.Config `yaml:"runtime_config,omitempty"`
MemberlistKV memberlist.KVConfig `yaml:"memberlist"`
Tracing tracing.Config `yaml:"tracing"`
CompactorConfig compactor.Config `yaml:"compactor,omitempty"`
QueryScheduler scheduler.Config `yaml:"query_scheduler"`
UsageReport usagestats.Config `yaml:"analytics"`
}
Config is the root config for Loki.
func (*Config) Clone ¶
func (c *Config) Clone() flagext.Registerer
Clone takes advantage of pass-by-value semantics to return a distinct *Config. This is primarily used to parse a different flag set without mutating the original *Config.
func (*Config) RegisterFlags ¶
func (c *Config) RegisterFlags(f *flag.FlagSet)
RegisterFlags registers flag.
type ConfigWrapper ¶
type ConfigWrapper struct {
Config `yaml:",inline"`
PrintVersion bool
VerifyConfig bool
PrintConfig bool
ListTargets bool
LogConfig bool
ConfigFile string
ConfigExpandEnv bool
}
ConfigWrapper is a struct containing the Loki config along with other values that can be set on the command line for interacting with the config file or the application directly. ConfigWrapper implements cfg.DynamicCloneable, allowing configuration to be dynamically set based on the logic in ApplyDynamicConfig, which receives values set in config file
func (*ConfigWrapper) ApplyDynamicConfig ¶
func (c *ConfigWrapper) ApplyDynamicConfig() cfg.Source
ApplyDynamicConfig satisfies WithCommonCloneable interface, and applies all rules for setting Loki config values from the common section of the Loki config file. This method's purpose is to simplify Loki's config in an opinionated way so that Loki can be run with the minimal amount of config options for most use cases. It also aims to reduce redundancy where some values are set multiple times through the Loki config.
func (*ConfigWrapper) Clone ¶
func (c *ConfigWrapper) Clone() flagext.Registerer
Clone takes advantage of pass-by-value semantics to return a distinct *Config. This is primarily used to parse a different flag set without mutating the original *Config.
func (*ConfigWrapper) RegisterFlags ¶
func (c *ConfigWrapper) RegisterFlags(f *flag.FlagSet)
type Loki ¶
type Loki struct {
Cfg Config
// set during initialization
ModuleManager *modules.Manager
Server *server.Server
TenantLimits validation.TenantLimits
Ingester ingester.Interface
Querier querier.Querier
Store storage.Store
RulerStorage rulestore.RuleStore
MemberlistKV *memberlist.KVInitService
QueryFrontEndTripperware basetripper.Tripperware
HTTPAuthMiddleware middleware.Interface
// contains filtered or unexported fields
}
Loki is the root datastructure for Loki.
func (*Loki) ListTargets ¶
func (t *Loki) ListTargets()
ListTargets prints a list of available user visible targets and their dependencies