Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Name refers the name of node's instance
Name string
// Version should be set to the version number of the program.
Version string `toml:"-"`
// DataDir is the root folder that store data and service-configs
DataDir string `toml:",omitempty"`
// HTTPHost is the host interface on which to start the HTTP RPC server.
HTTPHost string `toml:",omitempty"`
// HTTPPort is the TCP port number on which to start the HTTP RPC server.
HTTPPort int `toml:",omitempty"`
P2PPort int `toml:",omitempty"`
P2PPortConsensus int `toml:",omitempty"`
P2PSeeds []string `toml:",omitempty"`
LogLevel string `toml:",omitempty"`
// Logger is a custom logger
Logger log.Logger `toml:"-"`
Timer service_configs.TimerConfig
GRPC service_configs.GRPCConfig
Consensus service_configs.ConsensusConfig
}
func (*Config) ResolvePath ¶
ResolvePath resolves path in the instance directory.
type DuplicateServiceError ¶
type DuplicateServiceError struct {
//Kind reflect.Type
Kind string
}
func (*DuplicateServiceError) Error ¶
func (e *DuplicateServiceError) Error() string
type NamedServiceConstructor ¶
type NamedServiceConstructor struct {
// contains filtered or unexported fields
}
type Node ¶
type Node struct {
MainLoop *eventloop.EventLoop
EvBus EventBus.Bus
// contains filtered or unexported fields
}
Node is a container and manager of services
type ServiceConstructor ¶
type ServiceConstructor func(ctx *ServiceContext) (Service, error)
type ServiceContext ¶
type ServiceContext struct {
// contains filtered or unexported fields
}
func (*ServiceContext) Config ¶
func (ctx *ServiceContext) Config() Config
func (*ServiceContext) ResolvePath ¶
func (ctx *ServiceContext) ResolvePath(path string) string
func (*ServiceContext) Service ¶
func (ctx *ServiceContext) Service(name string) (interface{}, error)
Click to show internal directories.
Click to hide internal directories.