util

package
v1.20.3 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMesosAgentInnerIP

func GetMesosAgentInnerIP(attributes []*mesos.Attribute) (string, bool)

func ParseMesosResources

func ParseMesosResources(resources []*mesos.Resource) (float64, float64, float64, string)

func SetSchedulerCfg

func SetSchedulerCfg(config *SchedConfig, op *SchedulerOptions)

Types

type HttpListener

type HttpListener struct {
	TCPAddr  string
	UnixAddr string
	IsSSL    bool
	//CertDir    string
	CAFile     string
	CertFile   string
	KeyFile    string
	CertPasswd string
}

type ObjectLock

type ObjectLock struct {
	// contains filtered or unexported fields
}
var Lock *ObjectLock

func (*ObjectLock) Lock

func (l *ObjectLock) Lock(obj interface{}, key string)

func (*ObjectLock) UnLock

func (l *ObjectLock) UnLock(obj interface{}, key string)

type SchedConfig

type SchedConfig struct {
	Scheduler    Scheduler
	HttpListener HttpListener
	ZkHost       string
}

func NewSchedulerCfg

func NewSchedulerCfg() *SchedConfig

type Scheduler

type Scheduler struct {
	Hostname      string
	MesosMasterZK string
	BcsZK         string
	RegDiscvSvr   string
	Address       string
	Scheme        string
	ZK            string
	UseCache      bool
	DoRecover     bool
	Plugins       string
	PluginDir     string

	ClientCAFile   string
	ClientCertFile string
	ClientKeyFile  string

	ServerCAFile   string
	ServerCertFile string
	ServerKeyFile  string
	MetricPort     uint

	Cluster           string
	ContainerExecutor string
	ProcessExecutor   string
	CniDir            string
	NetImage          string

	Kubeconfig  string
	StoreDriver string

	//whether use pprof
	DebugMode bool
}

type SchedulerOptions

type SchedulerOptions struct {
	conf.FileConfig
	conf.ServiceConfig
	conf.MetricConfig
	conf.ZkConfig
	conf.CertConfig
	conf.LicenseServerConfig

	conf.LogConfig
	conf.ProcessConfig
	MesosMasterZK     string `json:"mesos_regdiscv" value:"" usage:"the address to discove mesos master"`
	RegDiscvSvr       string `json:"regdiscv" value:"" usage:"the address to register and discove scheduler"`
	UseCache          bool   `json:"use_cache" value:"false" usage:"whether use cache or not"`
	DoRecover         bool   `json:"do_recover" value:"false" usage:"whether recover taskgroup LOST to RUNNING in master role"`
	Plugins           string `json:"plugins" value:"" usage:"whether use plugins"`
	ZkHost            string `json:"zkhost" value:"" usage:"zk address"`
	Cluster           string `json:"cluster" value:"" usage:"the cluster ID under bcs"`
	PluginDir         string `json:"plugin_dir" value:"" usage:"the plugin dir"`
	ContainerExecutor string `json:"container_executor" value:"" usage:"the container executor path"`
	ProcessExecutor   string `json:"process_executor" value:"" usage:"the process executor path"`
	CniDir            string `json:"cni_dir" value:"" usage:"the cni directory"`
	NetImage          string `json:"net_image" value:"" usage:"the network image"`
	Kubeconfig        string `json:"kubeconfig" value:"" usage:"kubeconfig, when store_driver is etcd"`
	StoreDriver       string `json:"store_driver" value:"zookeeper" usage:"the store driver, enum: zookeeper, etcd"`
	DebugMode         bool   `json:"debug_mode" value:"false" usage:"Debug mode, use pprof."`
}

Jump to

Keyboard shortcuts

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