node

package
v2.0.7-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2025 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
	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(options *Options) (node *Node)

New return a new node

func (*Node) Close

func (n *Node) Close()

func (*Node) CompleteClose

func (n *Node) CompleteClose()

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
)

type Option

type Option func(options *Options)

Option function config Options

type Options

type Options struct {
	Node *node.Node
	Log  *logrus.Entry
}

Options Node's options

type Register

type Register struct {
	// contains filtered or unexported fields
}

func NewRegister

func NewRegister(log *logrus.Entry, n *node.Node) *Register

func (*Register) Close

func (r *Register) Close()

func (*Register) Closed

func (r *Register) Closed() chan struct{}

func (*Register) CompleteClose

func (r *Register) CompleteClose()

func (*Register) Run

func (r *Register) Run(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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