conf

package
v1.2.0-rc Latest Latest
Warning

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

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

Documentation

Overview

Package conf Define the configuration

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug() bool

Debug Return the switch of debug.

func DialerPublicAddr

func DialerPublicAddr() string

func EnableEss

func EnableEss() bool

func ErdaHelmChartVersion

func ErdaHelmChartVersion() string

func ErdaNamespace

func ErdaNamespace() string

func ListenAddr

func ListenAddr() string

ListenAddr return the address of listen.

func Load

func Load()

Load Load envs

func LocalMode

func LocalMode() bool

func OryCompatibleClientID

func OryCompatibleClientID() string

func OryCompatibleClientSecret

func OryCompatibleClientSecret() string

func OryEnabled

func OryEnabled() bool

func OryKratosPrivateAddr

func OryKratosPrivateAddr() string

func RedisAddr

func RedisAddr() string

RedisAddr 返回 redis 地址

func RedisMasterName

func RedisMasterName() string

RedisMasterName 返回redis master name

func RedisPwd

func RedisPwd() string

RedisPwd 返回 redis 密码

func RedisSentinelAddrs

func RedisSentinelAddrs() string

RedisSentinelAddrs 返回 redis 哨兵地址

func ReleaseRepo

func ReleaseRepo() string

func SchedulerAddr

func SchedulerAddr() string

SchedulerAddr Return the address of scheduler.

func SoldierAddr

func SoldierAddr() string

SoldierAddr return the address of soldier.

func TaskCleanDuration

func TaskCleanDuration() time.Duration

func TaskSyncDuration

func TaskSyncDuration() time.Duration

func UCClientID

func UCClientID() string

UCClientID 返回 UCClientID 选项.

func UCClientSecret

func UCClientSecret() string

UCClientSecret 返回 UCClientSecret 选项.

Types

type Conf

type Conf struct {
	Debug              bool          `env:"DEBUG" default:"false"`
	EnableEss          bool          `env:"ENABLE_ESS" default:"false"`
	ListenAddr         string        `env:"LISTEN_ADDR" default:":9027"`
	SoldierAddr        string        `env:"SOLDIER_ADDR"`
	SchedulerAddr      string        `env:"SCHEDULER_ADDR"`
	TaskSyncDuration   time.Duration `env:"TASK_SYNC_DURATION" default:"2h"`
	TaskCleanDuration  time.Duration `env:"TASK_CLEAN_DURATION" default:"24h"`
	LocalMode          bool          `env:"LOCAL_MODE" default:"false"`
	RedisMasterName    string        `default:"my-master" env:"REDIS_MASTER_NAME"`
	RedisSentinelAddrs string        `default:"" env:"REDIS_SENTINELS_ADDR"`
	RedisAddr          string        `default:"127.0.0.1:6379" env:"REDIS_ADDR"`
	RedisPwd           string        `default:"anywhere" env:"REDIS_PASSWORD"`
	UCClientID         string        `env:"UC_CLIENT_ID"`
	UCClientSecret     string        `env:"UC_CLIENT_SECRET"`
	// ory/kratos config
	OryEnabled           bool   `default:"false" env:"ORY_ENABLED"`
	OryKratosAddr        string `default:"kratos:4433" env:"KRATOS_ADDR"`
	OryKratosPrivateAddr string `default:"kratos:4434" env:"KRATOS_PRIVATE_ADDR"`

	ErdaNamespace        string `default:"erda-system" env:"ERDA_NAMESPACE"`
	ErdaHelmChartVersion string `default:"0.1.0" env:"ERDA_HELM_CHART_VERSION"`
	ReleaseRepo          string `default:"registry.erda.cloud/erda" env:"RELEASE_REPO"`
	DialerPublicAddr     string `env:"CLUSTER_DIALER_PUBLIC_ADDR"`
}

Conf Define the configuration

Jump to

Keyboard shortcuts

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