nodemanager

package
v0.0.3-generatorpow Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2018 License: GPL-3.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(extenderName string, extender NodeExtender)

func StartNode

func StartNode(node *node.Node)

start node

func StopNode

func StopNode(node *node.Node)

stop the node

func WaitNode

func WaitNode(node *node.Node)

wait the node to stop

Types

type ConsoleNodeManager

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

func NewConsoleNodeManager

func NewConsoleNodeManager(ctx *cli.Context, maker NodeMaker) ConsoleNodeManager

func (*ConsoleNodeManager) Node

func (nodeManager *ConsoleNodeManager) Node() *node.Node

func (*ConsoleNodeManager) Start

func (nodeManager *ConsoleNodeManager) Start() error

func (*ConsoleNodeManager) Stop

func (nodeManager *ConsoleNodeManager) Stop() error

type DefaultNodeManager

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

func NewDefaultNodeManager

func NewDefaultNodeManager(ctx *cli.Context, maker NodeMaker) DefaultNodeManager

func (*DefaultNodeManager) Node

func (nodeManager *DefaultNodeManager) Node() *node.Node

func (*DefaultNodeManager) Start

func (nodeManager *DefaultNodeManager) Start() error

func (*DefaultNodeManager) Stop

func (nodeManager *DefaultNodeManager) Stop() error

type FullNodeMaker

type FullNodeMaker struct {
}

func (FullNodeMaker) MakeNode

func (maker FullNodeMaker) MakeNode(ctx *cli.Context) *node.Node

func (FullNodeMaker) MakeNodeConfig

func (maker FullNodeMaker) MakeNodeConfig(ctx *cli.Context) *node.Config

type NodeExtender

type NodeExtender interface {
	Prepare(node *node.Node) error
	Start(node *node.Node) error
	Stop(node *node.Node) error
}

type NodeMaker

type NodeMaker interface {

	//create Node
	MakeNode(ctx *cli.Context) *node.Node

	//create NodeConfig
	MakeNodeConfig(ctx *cli.Context) *node.Config
}

type NodeManager

type NodeManager interface {
	Start() error

	Stop() error

	Node() *node.Node
}

type SubCmdNodeManager

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

func NewSubCmdNodeManager

func NewSubCmdNodeManager(ctx *cli.Context, maker NodeMaker) SubCmdNodeManager

func (*SubCmdNodeManager) Node

func (nodeManager *SubCmdNodeManager) Node() *node.Node

func (*SubCmdNodeManager) Start

func (nodeManager *SubCmdNodeManager) Start() error

func (*SubCmdNodeManager) Stop

func (nodeManager *SubCmdNodeManager) Stop() error

Jump to

Keyboard shortcuts

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