server

package
v0.0.0-...-f94ef0f Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: MIT Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestGas uint64 = 250000000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	*http.Server
	// contains filtered or unexported fields
}

Server represents the JSON-RPC 2.0 server.

func New

func New(chain blockchainer.Blockchainer, conf rpc.Config, coreServer *network.Server, wall *config.Wallet, log *zap.Logger) Server

New creates a new Server struct.

func (*Server) Shutdown

func (s *Server) Shutdown() error

Shutdown overrides the http.Server Shutdown method.

func (*Server) Start

func (s *Server) Start(errChan chan error)

Start creates a new JSON-RPC server listening on the configured port. It's supposed to be run as a separate goroutine (like http.Server's Serve) and it returns its errors via given errChan.

Jump to

Keyboard shortcuts

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