node

package
v1.0.12 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
}

func New

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

func (*Node) Role

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

func (*Node) Run

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

type NodeMode

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

func (NodeMode) String

func (n NodeMode) String() string

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