nodemanager

package
v2.7.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const CountPerDelete = 10000

Variables

This section is empty.

Functions

func IsExist

func IsExist(f string) bool

func Register

func Register(extenderName string, extender NodeExtender)

func StartNode

func StartNode(node *node.Node) error

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 CheckChainNodeManager

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

func NewCheckChainNodeManager

func NewCheckChainNodeManager(ctx *cli.Context, maker NodeMaker) (*CheckChainNodeManager, error)

func (*CheckChainNodeManager) Node

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

func (*CheckChainNodeManager) Start

func (nodeManager *CheckChainNodeManager) Start() error

func (*CheckChainNodeManager) Stop

func (nodeManager *CheckChainNodeManager) Stop() error

type ConsoleNodeManager

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

func NewConsoleNodeManager

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

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, error)

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 ExportNodeManager added in v1.3.2

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

func NewExportNodeManager added in v1.3.2

func NewExportNodeManager(ctx *cli.Context, maker NodeMaker) (*ExportNodeManager, error)

func (*ExportNodeManager) Start added in v1.3.2

func (nodeManager *ExportNodeManager) Start() error

type FullNodeMaker

type FullNodeMaker struct {
}

func (FullNodeMaker) MakeNode

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

func (FullNodeMaker) MakeNodeConfig

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

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, error)

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

type NodeManager

type NodeManager interface {
	Start() error

	Stop() error

	Node() *node.Node
}

type PluginDataNodeManager

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

func NewPluginDataNodeManager

func NewPluginDataNodeManager(ctx *cli.Context, maker NodeMaker) (*PluginDataNodeManager, error)

func (*PluginDataNodeManager) Node

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

func (*PluginDataNodeManager) Start

func (nodeManager *PluginDataNodeManager) Start() error

func (*PluginDataNodeManager) Stop

func (nodeManager *PluginDataNodeManager) Stop() error

type RecoverNodeManager added in v1.3.0

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

func NewRecoverNodeManager added in v1.3.0

func NewRecoverNodeManager(ctx *cli.Context, maker NodeMaker) (*RecoverNodeManager, error)

func (*RecoverNodeManager) Node added in v1.3.0

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

func (*RecoverNodeManager) Start added in v1.3.0

func (nodeManager *RecoverNodeManager) Start() error

func (*RecoverNodeManager) Stop added in v1.3.0

func (nodeManager *RecoverNodeManager) Stop() error

type SubCmdNodeManager

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

func NewSubCmdNodeManager

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

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