rpc

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Path = "/ol_rpc"
)

The http path used for our rpc handlers

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server holds an RPC server that is served over HTTP

func NewServer

func NewServer(w io.Writer) *Server

func (*Server) Close

func (srv *Server) Close()

Close terminates the underlying HTTP server and listener

func (*Server) Prepare

func (srv *Server) Prepare(u *url.URL, rcvr interface{}) error

Prepare injects all the data necessary for serving over the specified URL. It prepares a net.Listener over the specified URL, and registers all methods inside the given receiver. After this method is called, the Start function is ready to be called.

func (*Server) Start

func (srv *Server) Start() error

Start spawns a new goroutine and listens on the configured address. Prepare should be called before calling this method

Jump to

Keyboard shortcuts

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