conf

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package conf 定义了 orchestrator 所需要的配置选项,这些配置选项都是通过环境变量加载.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug() bool

Debug 返回 Debug 选项.

func DeployZookeeper

func DeployZookeeper() string

DeployZookeeper 返回 DeployZookeeper 选项.

func InitContainerImage

func InitContainerImage() string

InitContainerImage 返回 InitContainerImage 选项.

func InspectServiceGroupTimeout added in v1.0.0

func InspectServiceGroupTimeout() int

InspectServiceGroupTimeout time out of servicegroup

func InstancesPerService

func InstancesPerService() int

InstancesPerService 返回 InstancesPerService 选项.

func ListenAddr

func ListenAddr() string

ListenAddr 返回 ListenAddr 选项.

func Load

func Load()

Load 从环境变量加载配置选项.

func MainClusterName

func MainClusterName() string

MainClusterName 返回 MainClusterName 选项.

func PoolSize

func PoolSize() int

PoolSize 返回 PoolSize 选项.

func PrivateKey

func PrivateKey() string

PrivateKey 返回 PrivateKey 选项.

func PublicKey

func PublicKey() string

PublicKey 返回 PublicKey 选项.

func RedisAddr

func RedisAddr() string

RedisAddr 返回 RedisAddr 选项.

func RedisMasterName

func RedisMasterName() string

RedisMasterName 返回 RedisMasterName 选项.

func RedisPassword

func RedisPassword() string

RedisPassword 返回 RedisPassword 选项.

func RedisSentinels

func RedisSentinels() string

RedisSentinels 返回 RedisSentinels 选项.

func RuntimeUpMaxWaitTime

func RuntimeUpMaxWaitTime() int64

RuntimeUpMaxWaitTime 发布超时时间

func SchedulerAddr

func SchedulerAddr() string

SchedulerAddr 返回 SchedulerAddr 选项.

func SoldierAddr

func SoldierAddr() string

SoldierAddr 返回 SoldierAddr 选项.

func TenantGroupKey

func TenantGroupKey() string

TenantGroupKey 返回 TenantGroupKey 选项.

func TokenClientID

func TokenClientID() string

TokenClientID 返回 TokenClientID 选项.

func TokenClientSecret

func TokenClientSecret() string

TokenClientSecret 返回 TokenClientSecret 选项.

Types

type Conf

type Conf struct {
	Debug                      bool   `env:"DEBUG" default:"false"`
	ListenAddr                 string `env:"LISTEN_ADDR" default:"0.0.0.0:8081"`
	PoolSize                   int    `env:"POOL_SIZE" default:"100"`
	RedisMasterName            string `env:"REDIS_MASTER_NAME" default:"my-master"`
	RedisSentinels             string `env:"REDIS_SENTINELS_ADDR" default:""`
	RedisAddr                  string `env:"REDIS_ADDR" default:"127.0.0.1:6379"`
	RedisPassword              string `env:"REDIS_PASSWORD" default:""`
	InstancesPerService        int    `env:"INSTANCES_PER_SERVICE" default:"1000"`
	MainClusterName            string `env:"DICE_CLUSTER_NAME" default:""`
	TenantGroupKey             string `env:"TENANT_GROUP_KEY" default:""`
	SoldierAddr                string `env:"SOLDIER_ADDR" default:""`
	SchedulerAddr              string `env:"SCHEDULER_ADDR" default:""`
	DeployZookeeper            string `env:"DEPLOY_ZOOKEEPER" default:""`
	RuntimeUpMaxWaitTime       int64  `env:"MAX_WAIT_TIME" default:"15"`
	PublicKey                  string `` /* 395-byte string literal not displayed */
	PrivateKey                 string `` /* 1216-byte string literal not displayed */
	InitContainerImage         string `env:"INIT_CONTAINER_IMAGE" default:"registry.cn-hangzhou.aliyuncs.com/dice-third-party/curl:stable"`
	TokenClientID              string `env:"TOKEN_CLIENT_ID" default:"orchestrator"`
	TokenClientSecret          string `env:"TOKEN_CLIENT_SECRET" default:"devops/orchestrator"`
	InspectServiceGroupTimeout int    `env:"INSPECT_SERVICEGROUP_TIMEOUT" default:"60"`
}

Conf 定义配置对象.

Jump to

Keyboard shortcuts

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