configuration

package
v0.1.8-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AnnotationExporterEnableDefault name of the annotation for enable / disable parsing logs
	AnnotationExporterEnableDefault = "loggo.sla/enable" //

	// AnnotationExporterPathsDefault name of the annotation with label-regexpset definitions
	AnnotationExporterPathsDefault = "loggo.sla/paths"

	// AnnotationSLADomainsDefault name of the annotation with served domain list
	AnnotationSLADomainsDefault = "loggo.sla/domains"

	// AnnotationSLADomainsDeprecated deprecated name of the annotation with served domain list
	AnnotationSLADomainsDeprecated = "router.deis.io/domains"

	AnnotationExporterEnableTrueDeprecated = "enable"
	AnnotationExporterEnableTrue           = "true"
)

SLA related

View Source
const Parallelism = 8

Parallelism is a count of workers in each stage to run

Variables

This section is empty.

Functions

func K8sConfig

func K8sConfig(configPath string) (*rest.Config, error)

K8sConfig tries returns local k8s config or incluster config

Types

type AMQPTransportConfig

type AMQPTransportConfig struct {
	URL      string
	Exchange string
	Key      string
}

type Config

type Config struct {
	K8SExtends              K8SExtends
	ParserConfig            ParserConfig
	FollowerConfig          FollowerConfig
	JournaldConfig          JournaldConfig
	SLIExporterConfig       SLIExporterConfig
	FirehostTransportConfig FirehoseTransportConfig
	AMQPTransportConfig     AMQPTransportConfig
	RedisTransportConfig    RedisTransportConfig

	TransportBufferSizeMax int
	Transport              string

	LogsPath                 string
	PositionFilePath         string
	ContainersIgnoreFilePath string

	ReadRateRulesPath string
	ReadRateDefault   float64

	TargetsRefreshIntervalSec int
	FlushIntervalSec          int
	MetricsResetIntervalSec   int

	LogLevel  string
	LogFormat string
}

Config stores all configuration from environment or launch keys

func GetConfig

func GetConfig() Config

GetConfig generates Config from options and env vars

func (*Config) ToString

func (config *Config) ToString() string

ToString converts config to table formatted multiline string

type FirehoseTransportConfig

type FirehoseTransportConfig struct {
	DeliveryStream string
}

type FollowerConfig

type FollowerConfig struct {
	ReaderBufferSize                  int
	CursorCommitIntervalSec           int
	NoRecordsSleepIntervalSec         int
	ThrottlingLimitsUpdateIntervalSec int
	FromTailFlag                      bool
}

type JournaldConfig

type JournaldConfig struct {
	LogJournalD   bool
	JournaldPath  string
	MachineIDPath string
}

type K8SExtends

type K8SExtends struct {
	DataCenter     string
	Purpose        string
	NodeHostname   string
	LogType        string
	LogstashPrefix string
}

func (*K8SExtends) EntryMap

func (e *K8SExtends) EntryMap() common.EntryMap

type ParserConfig

type ParserConfig struct {
	UserLogFieldsKey string
	CRIFieldsKey     string
	ExtendsFieldsKey string
	RawLogFieldKey   string

	FlattenUserLog bool
}

type RedisTransportConfig

type RedisTransportConfig struct {
	URL             string
	Username        string
	Password        string
	Key             string
	MaxConnLifetime time.Duration
}

type SLIExporterConfig

type SLIExporterConfig struct {
	Enabled bool

	K8SConfigPath        string
	Buckets              string
	ServiceSourcePath    string
	ServiceDefaultDomain string

	ServiceUpdateIntervalSec int

	AnnotationExporterEnable string
	AnnotationExporterPaths  string
	AnnotationSLADomains     string
}

Jump to

Keyboard shortcuts

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