neo-go: Index | Files

package server

import ""


Package Files

prometheus.go server.go

type Server Uses

type Server struct {
    // contains filtered or unexported fields

Server represents the JSON-RPC 2.0 server.

func New Uses

func New(chain core.Blockchainer, conf rpc.Config, coreServer *network.Server, log *zap.Logger) Server

New creates a new Server struct.

func (*Server) Shutdown Uses

func (s *Server) Shutdown() error

Shutdown overrides the http.Server Shutdown method.

func (*Server) Start Uses

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

Start creates a new JSON-RPC server listening on the configured port.

func (*Server) WriteErrorResponse Uses

func (s *Server) WriteErrorResponse(r *request.In, w http.ResponseWriter, err error)

WriteErrorResponse writes an error response to the ResponseWriter.

func (*Server) WriteResponse Uses

func (s *Server) WriteResponse(r *request.In, w http.ResponseWriter, result interface{})

WriteResponse encodes the response and writes it to the ResponseWriter.

Package server imports 27 packages (graph) and is imported by 2 packages. Updated 2020-04-09. Refresh now. Tools for package owners.