server

package
v0.99.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: MIT Imports: 52 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, errChan chan error) Server

New creates a new Server struct.

func (*Server) Name added in v0.99.0

func (s *Server) Name() string

Name returns service name.

func (*Server) Shutdown

func (s *Server) Shutdown()

Shutdown stops the RPC server. It can only be called once.

func (*Server) Start

func (s *Server) Start()

Start creates a new JSON-RPC server listening on the configured port. It creates goroutines needed internally and it returns its errors via errChan passed to New().

Jump to

Keyboard shortcuts

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