node

package
v0.0.0-...-25da3cc Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorCanNotSubmitToNotLeaderNode = errors.New("can not submit to not leader node")
	ErrorStopTheWorld                = errors.New("node is stop the world")
)

Functions

This section is empty.

Types

type Node

type Node struct {
	NodeId   string
	NodeName string

	Status int

	Cluster  *cluster.Cluster
	Registry *registry.Registry
	Runtime  *runtime.Runtime
	// contains filtered or unexported fields
}

func NewNode

func NewNode(profile *config.Profile, shutdown chan string) (*Node, error)

func (*Node) ClusterId

func (n *Node) ClusterId() string

func (*Node) Config

func (n *Node) Config() *config.Profile

func (*Node) IsLeader

func (n *Node) IsLeader() bool

func (*Node) IsMaster

func (n *Node) IsMaster() bool

func (*Node) IsWorker

func (n *Node) IsWorker() bool

func (*Node) NodeInfo

func (n *Node) NodeInfo() *core.NodeInfo

func (*Node) RegisterExecutor

func (n *Node) RegisterExecutor(taskInfo *core.TaskConfig) *core.Result

RegisterExecutor

func (*Node) Shutdown

func (n *Node) Shutdown()

func (*Node) Start

func (n *Node) Start() error

func (*Node) SubmitExecutor

func (n *Node) SubmitExecutor(execInfo *core.ExecutorInfo) *core.Result

SubmitExecutor

func (*Node) SubmitStartExecutor

func (n *Node) SubmitStartExecutor(taskId string) *core.Result

SubmitStartExecutor

func (*Node) SubmitStopExecutor

func (n *Node) SubmitStopExecutor(taskId string) *core.Result

SubmitStopExecutor

Jump to

Keyboard shortcuts

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