config

package
v0.0.0-...-211e212 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigMapProvider configMapProvider

Functions

func ApplyGlobals

func ApplyGlobals(cfg *KubeccSpec)

ApplyGlobals walks the config structure of KubeccSpec (depth 1), finds any structs that contain a *GlobalSpec field, and syncs non-overridden global fields from the top level KubeccSpec globals.

Types

type AgentSpec

type AgentSpec struct {
	GlobalSpec
	UsageLimits      *UsageLimitsSpec `json:"usageLimits,omitempty"`
	SchedulerAddress string           `json:"schedulerAddress,omitempty"`
	MonitorAddress   string           `json:"monitorAddress,omitempty"`
}

type CacheSpec

type CacheSpec struct {
	GlobalSpec
	VolatileStorage *VolatileStorageSpec `json:"volatileStorage,omitempty"`
	LocalStorage    *LocalStorageSpec    `json:"localStorage,omitempty"`
	RemoteStorage   *RemoteStorageSpec   `json:"remoteStorage,omitempty"`
	ListenAddress   string               `json:"listenAddress,omitempty"`
	MonitorAddress  string               `json:"monitorAddress,omitempty"`
}

type ConfigLoader

type ConfigLoader interface {
	Load() *KubeccSpec
}

type ConsumerSpec

type ConsumerSpec struct {
	GlobalSpec
	ConsumerdAddress string `json:"consumerdAddress,omitempty"`
}

type ConsumerdSpec

type ConsumerdSpec struct {
	GlobalSpec
	UsageLimits      *UsageLimitsSpec `json:"usageLimits,omitempty"`
	SchedulerAddress string           `json:"schedulerAddress,omitempty"`
	MonitorAddress   string           `json:"monitorAddress,omitempty"`
	ListenAddress    string           `json:"listenAddress,omitempty"`
	DisableTLS       bool             `json:"disableTLS,omitempty"`
}

type GlobalSpec

type GlobalSpec struct {
	LogLevel LogLevelString `json:"logLevel,omitempty"`
	LogFile  string         `json:"logFile,omitempty"`
}

func (*GlobalSpec) Merge

func (override *GlobalSpec) Merge(global GlobalSpec)

Merge will load fields from the global GlobalSpec into a component's optional GlobalSpec if a field has not been specifically overridden by the component.

type KcctlSpec

type KcctlSpec struct {
	GlobalSpec
	MonitorAddress   string `json:"monitorAddress,omitempty"`
	SchedulerAddress string `json:"schedulerAddress,omitempty"`
	DisableTLS       bool   `json:"disableTLS,omitempty"`
}

type KubeccSpec

type KubeccSpec struct {
	Global    GlobalSpec    `json:"global,omitempty"`
	Agent     AgentSpec     `json:"agent,omitempty"`
	Consumer  ConsumerSpec  `json:"consumer,omitempty"`
	Consumerd ConsumerdSpec `json:"consumerd,omitempty"`
	Scheduler SchedulerSpec `json:"scheduler,omitempty"`
	Monitor   MonitorSpec   `json:"monitor,omitempty"`
	Cache     CacheSpec     `json:"cache,omitempty"`
	Kcctl     KcctlSpec     `json:"kcctl,omitempty"`
}

func LoadFile

func LoadFile(path string) *KubeccSpec

type LocalStorageSpec

type LocalStorageSpec struct {
	Limits StorageLimitsSpec `json:"limits,omitempty"`
	Path   string            `json:"path,omitempty"`
}

type LogLevelString

type LogLevelString string

func (LogLevelString) Level

func (str LogLevelString) Level() (l zapcore.Level)

type MonitorSpec

type MonitorSpec struct {
	GlobalSpec
	ListenAddress          string `json:"listenAddress,omitempty"`
	ServePrometheusMetrics bool   `json:"servePrometheusMetrics,omitempty"`
}

type RemoteStorageSpec

type RemoteStorageSpec struct {
	Endpoint       string `json:"endpoint,omitempty"`
	AccessKey      string `json:"accessKey,omitempty"`
	SecretKey      string `json:"secretKey,omitempty"`
	TLS            bool   `json:"tls,omitempty"`
	CertPath       string `json:"certPath,omitempty"`
	Bucket         string `json:"bucket,omitempty"`
	Region         string `json:"region,omitempty"`
	ExpirationDays int    `json:"expirationDays,omitempty"`
}

type SchedulerSpec

type SchedulerSpec struct {
	GlobalSpec
	MonitorAddress string `json:"monitorAddress,omitempty"`
	CacheAddress   string `json:"cacheAddress,omitempty"`
	ListenAddress  string `json:"listenAddress,omitempty"`
}

type StorageLimitsSpec

type StorageLimitsSpec struct {
	Memory string `json:"memory,omitempty"`
	Disk   string `json:"disk,omitempty"`
}

type UsageLimitsSpec

type UsageLimitsSpec struct {
	ConcurrentProcessLimit int `json:"concurrentProcessLimit,omitempty"`
}

func (*UsageLimitsSpec) GetConcurrentProcessLimit

func (ul *UsageLimitsSpec) GetConcurrentProcessLimit() int

type VolatileStorageSpec

type VolatileStorageSpec struct {
	Limits StorageLimitsSpec `json:"limits,omitempty"`
}

Jump to

Keyboard shortcuts

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