node

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	Mode     *NodeMode
	Options  *Options
	Name     string
	Register *register.Register

	Scheduler     *scheduler.Scheduler
	StatusManager *manager_status.Manager
	// contains filtered or unexported fields
}

Node represents a node instance Running pipeline, reporting status, etc. if it becomes the master node, it will run tasks such as scheduling pipeline, monitoring, event management, etc

func New

func New(opts ...Option) (node *Node, err error)

New return a new node

func (*Node) Role

func (n *Node) Role() role.Role

Role returns current role

func (*Node) Run

func (n *Node) Run(ctx context.Context) (err error)

Run start working

type NodeMode

type NodeMode byte
const (
	MODE_CLUSTER NodeMode = 1
	MODE_SINGLE  NodeMode = 2
)

func (NodeMode) String

func (n NodeMode) String() string

NodeMode todo

type Option

type Option func(options *Options)

Option function config Options

func OptionNode

func OptionNode(node *node.Node) Option

OptionNode sets Options Node

type Options

type Options struct {
	Node *node.Node
}

Options Node's options

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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