option

package
v5.0.3-release+incompa... Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2019 License: LGPL-3.0 Imports: 12 Imported by: 90

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Config = new(Conf)
)

Functions

func Init

func Init() error

Init 初始化

Types

type Conf

type Conf struct {
	APIAddr                         string //api server listen port
	PrometheusAPI                   string //Prometheus server listen port
	K8SConfPath                     string //absolute path to the kubeconfig file
	LogLevel                        string
	LogFile                         string
	HostIDFile                      string
	HostIP                          string
	RunMode                         string //ACP_NODE 运行模式:master,node
	NodeRule                        string //节点属性 compute manage storage
	Service                         string //服务注册与发现
	InitStatus                      string
	NodePath                        string   //Rainbond node model basic information storage path in etcd
	EventLogServer                  []string //event server address list
	ConfigStoragePath               string   //config storage path in etcd
	TTL                             int64    // node heartbeat to master TTL
	PodCIDR                         string   //pod cidr, when master not set cidr,this parameter can take effect
	Etcd                            client.Config
	StatsdConfig                    StatsdConfig
	UDPMonitorConfig                UDPMonitorConfig
	MinResyncPeriod                 time.Duration
	AutoUnschedulerUnHealthDuration time.Duration
	AutoScheduler                   bool

	// for node controller
	ServiceListFile string
	ServiceManager  string
	EnableInitStart bool
	AutoRegistNode  bool
	DockerCli       *dockercli.Client
	EtcdCli         *client.Client

	//The following parameters are to be removed
	Proc                string // 当前节点正在执行任务存储路径
	StaticTaskPath      string // 配置静态task文件宿主机路径
	JobPath             string // 节点执行任务保存路径
	Lock                string // job lock 路径
	Group               string // 节点分组
	Noticer             string // 通知
	ExecutionRecordPath string
	BuildIn             string
	BuildInExec         string
	CompJobStatus       string
	FailTime            int
	CheckIntervalSec    int
	InstalledMarker     string
	ReqTimeout          int // 请求超时时间,单位秒
	// 执行任务信息过期时间,单位秒
	// 0 为不过期
	ProcTTL int64
	// 记录任务执行中的信息的执行时间阀值,单位秒
	// 0 为不限制
	ProcReq int64
	// 单机任务锁过期时间,单位秒
	// 默认 300
	LockTTL int64
}

Conf Conf

func (*Conf) AddFlags

func (a *Conf) AddFlags(fs *pflag.FlagSet)

AddFlags AddFlags

func (*Conf) ParseClient

func (a *Conf) ParseClient() (err error)

ParseClient handle config and create some api

func (*Conf) SetLog

func (a *Conf) SetLog()

SetLog 设置log

type SessionConfig

type SessionConfig struct {
	Expiration      int
	CookieName      string
	StorePrefixPath string
}

type StatsdConfig

type StatsdConfig struct {
	StatsdListenAddress string
	StatsdListenUDP     string
	StatsdListenTCP     string
	MappingConfig       string
	ReadBuffer          int
}

StatsdConfig StatsdConfig

type UDPMonitorConfig

type UDPMonitorConfig struct {
	ListenHost string
	ListenPort string
}

UDPMonitorConfig UDPMonitorConfig

Jump to

Keyboard shortcuts

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