option

package
v5.1.11-release+incomp... Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2020 License: LGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	EtcdEndPoints           []string
	EtcdTimeout             int
	EtcdPrefix              string
	ClusterName             string
	MysqlConnectionInfo     string
	DBType                  string
	PrometheusMetricPath    string
	EventLogServers         []string
	KubeConfig              string
	MaxTasks                int
	MQAPI                   string
	NodeName                string
	NodeAPI                 string
	Listen                  string
	HostIP                  string
	ServerPort              int
	KubeClient              *kubernetes.Clientset
	LeaderElectionNamespace string
	LeaderElectionIdentity  string
}

Config config server

type Worker

type Worker struct {
	Config
	LogLevel string
	RunMode  string //default,sync
}

Worker worker server

func NewWorker

func NewWorker() *Worker

NewWorker new server

func (*Worker) AddFlags

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

AddFlags config

func (*Worker) CheckEnv

func (a *Worker) CheckEnv() error

CheckEnv 检测环境变量

func (*Worker) SetLog

func (a *Worker) SetLog()

SetLog 设置log

Jump to

Keyboard shortcuts

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