conf

package
v1.0.0-RC Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLUSTERS_CONFIG_PATH = "/dice/scheduler/configs/cluster/"
)

Variables

This section is empty.

Functions

func Debug

func Debug() bool

Debug return cfg.Debug

func DefaultRuntimeExecutor

func DefaultRuntimeExecutor() string

DefaultRuntimeExecutor return cfg.DefaultRuntimeExecutor

func KafkaBrokers

func KafkaBrokers() string

func KafkaContainerTopic

func KafkaContainerTopic() string

func KafkaGroup

func KafkaGroup() string

func ListenAddr

func ListenAddr() string

ListenAddr return cfg.ListenAddr

func Load

func Load()

Load environment variable

func PlaceHolderImage

func PlaceHolderImage() string

PlaceHolderImage return cfg.PlaceHolderImage

func PoolSize

func PoolSize() int

PoolSize return cfg.PoolSize

func TerminalSecurity

func TerminalSecurity() bool

TerminalSecurity return cfg.TerminalSecurity

func TraceLogEnv

func TraceLogEnv() string

TraceLogEnv return cfg.TraceLogEnv

func WsDiceRootDomain

func WsDiceRootDomain() string

Types

type Conf

type Conf struct {
	// Debug Control log level
	Debug bool `env:"DEBUG" default:"false"`
	// PoolSize goroutine pool size
	PoolSize int `env:"POOL_SIZE" default:"50"`
	// ListenAddr scheduler listening address , eg: ":9091"
	ListenAddr             string `env:"LISTEN_ADDR" default:":9091"`
	DefaultRuntimeExecutor string `env:"DEFAULT_RUNTIME_EXECUTOR" default:"MARATHON"`
	// TraceLogEnv shows the key of environment variable defined for tracing log
	TraceLogEnv string `env:"TRACELOGENV" default:"TERMINUS_DEFINE_TAG"`
	// PlaceHolderImage Image used to occupy the seat when disassembling the service deployment
	PlaceHolderImage string `env:"PLACEHOLDER_IMAGE" default:"registry.cn-hangzhou.aliyuncs.com/terminus/busybox"`

	KafkaBrokers        string `env:"BOOTSTRAP_SERVERS"`
	KafkaContainerTopic string `env:"CMDB_CONTAINER_TOPIC"`
	KafkaGroup          string `env:"CMDB_GROUP"`

	TerminalSecurity bool `env:"TERMINAL_SECURITY" default:"false"`

	WsDiceRootDomain string `env:"WS_DICE_ROOT_DOMAIN" default:"app.terminus.io,erda.cloud"`
}

Conf scheduler conf, use envconf to load configuration

type ConfStore

type ConfStore struct {
	ExecutorStore sync.Map
}

func GetConfStore

func GetConfStore() *ConfStore

type ExecutorConfig

type ExecutorConfig struct {
	Kind        string            `json:"kind,omitempty"`
	Name        string            `json:"name,omitempty"`
	ClusterName string            `json:"clusterName,omitempty"`
	Options     map[string]string `json:"options,omitempty"`
	OptionsPlus *OptPlus          `json:"optionsPlus,omitempty"`
}

type OptPlus

type OptPlus struct {
	Orgs []Org `json:"orgs,omitempty"`
}

type Org

type Org struct {
	Name       string            `json:"name,omitempty"`
	Workspaces []Workspace       `json:"workspaces,omitempty"`
	Options    map[string]string `json:"options,omitempty"`
}

Org organization, Corresponding tenant concept

type Workspace

type Workspace struct {
	Name    string            `json:"name,omitempty"`
	Options map[string]string `json:"options,omitempty"`
}

Environment

Jump to

Keyboard shortcuts

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