nodeserver

package
v3.6.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2018 License: LGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateNode

func CreateNode(cfg *conf.Conf, nodeID, ip string) model.HostNode

CreateNode 创建节点信息

func GetCurrentNode

func GetCurrentNode(cfg *conf.Conf) (*model.HostNode, error)

GetCurrentNode 获取当前节点

Types

type Config

type Config struct {
	EtcdEndPoints        []string
	EtcdTimeout          int
	EtcdPrefix           string
	ClusterName          string
	APIAddr              string
	K8SConfPath          string
	EventServerAddress   []string
	PrometheusMetricPath string
	TTL                  int64
}

Config config server

type Jobs

type Jobs map[string]*corejob.Job

Jobs jobs

type NodeServer

type NodeServer struct {
	*store.Client
	*model.HostNode
	*cron.Cron

	//Config
	*conf.Conf
	// contains filtered or unexported fields
}

NodeServer node manager server

func NewNodeServer

func NewNodeServer(cfg *conf.Conf) (*NodeServer, error)

NewNodeServer new server

func (*NodeServer) Regist

func (n *NodeServer) Regist() error

Regist 节点注册

func (*NodeServer) Run

func (n *NodeServer) Run(errchan chan error) (err error)

Run 启动

func (*NodeServer) Stop

func (n *NodeServer) Stop(i interface{})

Stop 停止服务

Jump to

Keyboard shortcuts

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