server

package
v0.98.5 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: MIT Imports: 50 Imported by: 0

Documentation

Index

Constants

This section is empty.

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,
	orc *oracle.Oracle, 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