context

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LedgerService      = "ledgerService"
	WalletService      = "walletService"
	P2PService         = "P2PService"
	ConsensusService   = "consensusService"
	RPCService         = "rpcService"
	IndexService       = "indexService"
	PovService         = "povService"
	MinerService       = "minerService"
	AutoReceiveService = "autoReceiveService"
	MetricsService     = "metricsService"
	ChainManageService = "chainManageService"
	LogService         = "logService"
	ResendBlockService = "resendBlockService"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainContext

type ChainContext struct {
	common.ServiceLifecycle
	// contains filtered or unexported fields
}

func NewChainContext

func NewChainContext(cfgFile string) *ChainContext

func NewChainContextFromOriginal

func NewChainContextFromOriginal(cc *ChainContext) *ChainContext

func (*ChainContext) Accounts

func (cc *ChainContext) Accounts() []*types.Account

func (*ChainContext) AllServices

func (cc *ChainContext) AllServices() ([]common.Service, error)

func (*ChainContext) Config

func (cc *ChainContext) Config() (*config.Config, error)

func (*ChainContext) ConfigFile

func (cc *ChainContext) ConfigFile() string

func (*ChainContext) ConfigManager

func (cc *ChainContext) ConfigManager(opts ...Option) (*config.CfgManager, error)

func (*ChainContext) Destroy

func (cc *ChainContext) Destroy() error

func (*ChainContext) EventBus

func (cc *ChainContext) EventBus() event.EventBus

func (*ChainContext) HasService

func (cc *ChainContext) HasService(name string) bool

func (*ChainContext) Id

func (cc *ChainContext) Id() string

func (*ChainContext) Init

func (cc *ChainContext) Init(fn func() error) error

func (*ChainContext) Register

func (cc *ChainContext) Register(name string, service common.Service) error

func (*ChainContext) ReloadService

func (cc *ChainContext) ReloadService(name string) error

func (*ChainContext) RestartAll

func (*ChainContext) RestartAll() error

func (*ChainContext) Service

func (cc *ChainContext) Service(name string) (common.Service, error)

func (*ChainContext) SetAccounts

func (cc *ChainContext) SetAccounts(accounts []*types.Account)

func (*ChainContext) Start

func (cc *ChainContext) Start() error

func (*ChainContext) Status

func (cc *ChainContext) Status() int32

func (*ChainContext) Stop

func (cc *ChainContext) Stop() error

func (*ChainContext) UnRegister

func (cc *ChainContext) UnRegister(name string) error

func (*ChainContext) WaitForever

func (cc *ChainContext) WaitForever()

type Option

type Option func(cm *config.CfgManager) error

Jump to

Keyboard shortcuts

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