Documentation ¶
Index ¶
- func StartServer(svr *Server, cfg *config.Config)
- type HeartbeatHandler
- type Server
- func (s *Server) ChainService(id uint32) *chainservice.ChainService
- func (s *Server) Dispatcher() dispatcher.Dispatcher
- func (s *Server) NewChainService(cfg *config.Config) error
- func (s *Server) NewTestingChainService(cfg *config.Config) error
- func (s *Server) P2P() network.Overlay
- func (s *Server) Start(ctx context.Context) error
- func (s *Server) StartChainService(ctx context.Context, id uint32) error
- func (s *Server) Stop(ctx context.Context) error
- func (s *Server) StopChainService(ctx context.Context, id uint32) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartServer ¶
StartServer starts a node server
Types ¶
type HeartbeatHandler ¶
type HeartbeatHandler struct {
// contains filtered or unexported fields
}
HeartbeatHandler is the handler to periodically log the system key metrics
func NewHeartbeatHandler ¶
func NewHeartbeatHandler(s *Server) *HeartbeatHandler
NewHeartbeatHandler instantiates a HeartbeatHandler instance
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the iotex server instance containing all components.
func NewInMemTestServer ¶
NewInMemTestServer creates a test server in memory
func NewServer ¶
NewServer creates a new server TODO clean up config, make root config contains network, dispatch and chainservice
func (*Server) ChainService ¶
func (s *Server) ChainService(id uint32) *chainservice.ChainService
ChainService returns the chainservice hold in Server with given id.
func (*Server) Dispatcher ¶
func (s *Server) Dispatcher() dispatcher.Dispatcher
Dispatcher returns the Dispatcher
func (*Server) NewChainService ¶
NewChainService creates a new chain service in this server.
func (*Server) NewTestingChainService ¶
NewTestingChainService creates a new testing chain service in this server.
func (*Server) StartChainService ¶
StartChainService starts the chain service run in the server.