itx

package
v2.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 39 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProducerKeysAdmin added in v2.3.7

func NewProducerKeysAdmin(svr *Server) http.Handler

NewProducerKeysAdmin returns an admin handler for hot-updating producer keys.

func StartServer

func StartServer(ctx context.Context, svr *Server, probeSvr *probe.Server, cfg config.Config)

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, cfg p2p.Config) *HeartbeatHandler

NewHeartbeatHandler instantiates a HeartbeatHandler instance

func (*HeartbeatHandler) Log

func (h *HeartbeatHandler) Log()

Log executes the logging logic

type PauseMgr added in v2.2.1

type PauseMgr struct {
	// contains filtered or unexported fields
}

func NewPauseMgr added in v2.2.1

func NewPauseMgr(pauses ...Pauseable) *PauseMgr

func (*PauseMgr) HandlePause added in v2.2.1

func (pm *PauseMgr) HandlePause(w http.ResponseWriter, r *http.Request)

func (*PauseMgr) HandleUnPause added in v2.2.1

func (pm *PauseMgr) HandleUnPause(w http.ResponseWriter, r *http.Request)

func (*PauseMgr) Pause added in v2.2.1

func (pm *PauseMgr) Pause(pause bool)

type Pauseable added in v2.2.1

type Pauseable interface {
	Pause(bool)
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is the iotex server instance containing all components.

func NewInMemTestServer

func NewInMemTestServer(cfg config.Config, opts ...chainservice.BuildOption) (*Server, error)

NewInMemTestServer creates a test server in memory

func NewServer

func NewServer(cfg config.Config, opts ...chainservice.BuildOption) (*Server, error)

NewServer creates a new server. opts are forwarded to the chainservice builder; a production node passes none and is fully described by cfg. TODO clean up config, make root config contains network, dispatch and chainservice

func (*Server) APIServer

func (s *Server) APIServer(id uint32) *api.ServerV2

APIServer returns the API Server hold in Server with given id.

func (*Server) ChainService

func (s *Server) ChainService(id uint32) *chainservice.ChainService

ChainService returns the chainservice hold in Server with given id.

func (*Server) Config

func (s *Server) Config() config.Config

Config returns the server's config

func (*Server) Dispatcher

func (s *Server) Dispatcher() dispatcher.Dispatcher

Dispatcher returns the Dispatcher

func (*Server) NewSubChainService

func (s *Server) NewSubChainService(cfg config.Config) error

NewSubChainService creates a new chain service in this server.

func (*Server) P2PAgent

func (s *Server) P2PAgent() p2p.Agent

P2PAgent returns the P2P agent

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Start starts the server

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

Stop stops the server

func (*Server) StopChainService

func (s *Server) StopChainService(ctx context.Context, id uint32) error

StopChainService stops the chain service run in the server.

func (*Server) UpdateProducerKeys added in v2.3.7

func (s *Server) UpdateProducerKeys(keys []crypto.PrivateKey) ([]string, error)

UpdateProducerKeys refreshes the root chain producer keys in memory and updates the cached config copy.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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