context

package
v0.0.0-...-c4e9093 Latest Latest
Warning

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

Go to latest
Published: May 19, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogService      = "logService"
	ContractService = "contractService"
	RPCService      = "rpcService"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(cm *config.CfgManager) error

type ServiceContext

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

func NewServiceContext

func NewServiceContext(cfgFile string) *ServiceContext

func (*ServiceContext) Account

func (sc *ServiceContext) Account() *qlctypes.Account

func (*ServiceContext) AllServices

func (sc *ServiceContext) AllServices() ([]common.Service, error)

func (*ServiceContext) Config

func (sc *ServiceContext) Config() (*config.Config, error)

func (*ServiceContext) ConfigFile

func (sc *ServiceContext) ConfigFile() string

func (*ServiceContext) ConfigManager

func (sc *ServiceContext) ConfigManager(opts ...Option) (*config.CfgManager, error)

func (*ServiceContext) EventBus

func (sc *ServiceContext) EventBus() event.EventBus

func (*ServiceContext) HasService

func (sc *ServiceContext) HasService(name string) bool

func (*ServiceContext) Id

func (sc *ServiceContext) Id() string

func (*ServiceContext) Init

func (sc *ServiceContext) Init(fn func() error) error

func (*ServiceContext) Register

func (sc *ServiceContext) Register(name string, service common.Service) error

func (*ServiceContext) Service

func (sc *ServiceContext) Service(name string) (common.Service, error)

func (*ServiceContext) SetAccount

func (sc *ServiceContext) SetAccount(account *qlctypes.Account)

func (*ServiceContext) Start

func (sc *ServiceContext) Start() error

func (*ServiceContext) Status

func (sc *ServiceContext) Status() int32

func (*ServiceContext) Stop

func (sc *ServiceContext) Stop() error

func (*ServiceContext) UnRegister

func (sc *ServiceContext) UnRegister(name string) error

Jump to

Keyboard shortcuts

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