Documentation
¶
Overview ¶
Package server implements server.
Index ¶
Constants ¶
View Source
const ( // RPCVersion should be bumped anytime changes are made which require // the RPC client to upgrade to latest RPC server to be compatible // Note: This should match the node's RPC protocol version for compatibility RPCVersion uint32 = 42 MinNodes uint32 = 1 DefaultNodes uint32 = 5 TimeParseLayout = "2006-01-02 15:04:05" StakingMinimumLeadTime = 25 * time.Second )
Variables ¶
View Source
var ( ErrInvalidVMName = errors.New("invalid VM name") ErrInvalidPort = errors.New("invalid port") ErrNotEnoughNodesForStart = errors.New("not enough nodes specified for start") ErrAlreadyBootstrapped = errors.New("already bootstrapped") ErrNotBootstrapped = errors.New("not bootstrapped") ErrNodeNotFound = errors.New("node not found") ErrPeerNotFound = errors.New("peer not found") ErrStatusCanceled = errors.New("status stream canceled") ErrNoChainSpec = errors.New("no blockchain spec was provided") ErrNoChainID = errors.New("chainID is missing") ErrNoElasticChainSpec = errors.New("no elastic chain spec was provided") ErrNoValidatorSpec = errors.New("no validator spec was provided") )
Functions ¶
func IsServerError ¶
IsServerError reports whether err's text matches serverError's text. Used by callers to recognise domain errors that round-tripped as plain strings across the ZAP envelope (we don't ship typed gRPC status codes anymore).
Types ¶
type Config ¶
type Config struct {
// Port is the TCP address the netrunner ZAP server listens on,
// e.g. ":8546" or "127.0.0.1:8546".
Port string
// GwPort is reserved for the optional ZIP edge surface (Fiber v3 /
// fasthttp). Empty means no HTTP edge — clients talk ZAP directly.
// The previous grpc-gateway HTTP→gRPC bridge is gone with the gRPC
// transport itself.
GwPort string
DialTimeout time.Duration
RedirectNodesOutput bool
SnapshotsDir string
LogLevel log.Level
}
Click to show internal directories.
Click to hide internal directories.