Documentation ¶
Index ¶
- Constants
- type ChainContext
- func (cc *ChainContext) Accounts() []*types.Account
- func (cc *ChainContext) AllServices() ([]common.Service, error)
- func (cc *ChainContext) Config() (*config.Config, error)
- func (cc *ChainContext) ConfigFile() string
- func (cc *ChainContext) ConfigManager(opts ...Option) (*config.CfgManager, error)
- func (cc *ChainContext) Destroy() error
- func (cc *ChainContext) EventBus() event.EventBus
- func (cc *ChainContext) HasService(name string) bool
- func (cc *ChainContext) Id() string
- func (cc *ChainContext) Init(fn func() error) error
- func (cc *ChainContext) Register(name string, service common.Service) error
- func (cc *ChainContext) ReloadService(name string) error
- func (*ChainContext) RestartAll() error
- func (cc *ChainContext) Service(name string) (common.Service, error)
- func (cc *ChainContext) SetAccounts(accounts []*types.Account)
- func (cc *ChainContext) Start() error
- func (cc *ChainContext) Status() int32
- func (cc *ChainContext) Stop() error
- func (cc *ChainContext) UnRegister(name string) error
- func (cc *ChainContext) WaitForever()
- type Option
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) 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) 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
Click to show internal directories.
Click to hide internal directories.