rpc_server

package
v0.0.0-...-487d906 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2015 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAlreadyRegistered = errors.New("RPC Endpoint already registered")
	ErrMissingObject     = errors.New("Register needs an Object pointer ")
	ErrNoServer          = errors.New("No RPC server present ")
	ErrMissingName       = errors.New("name must have a value ")
)

Functions

func Nuke

func Nuke()

This is only for testing.

func Register

func Register(name string, obj interface{}) error

Types

type NewServerCodec

type NewServerCodec func(conn io.ReadWriteCloser) netrpc.ServerCodec

type RPCImpl

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

func NewServer

func NewServer() *RPCImpl

func (*RPCImpl) Init

func (impl *RPCImpl) Init(tlscfg *ssltls.Cfg, enforce_secure bool, port int, newServerCodec NewServerCodec) error

func (*RPCImpl) MuxRPC

func (impl *RPCImpl) MuxRPC(conn net.Conn, isTLS bool)

func (*RPCImpl) Server

func (impl *RPCImpl) Server() *netrpc.Server

func (*RPCImpl) Shutdown

func (impl *RPCImpl) Shutdown()

func (*RPCImpl) Start

func (impl *RPCImpl) Start() error

type SvcRPC

type SvcRPC interface {
	Init(*ssltls.Cfg, bool, int, NewServerCodec) error
	Start() error
	Shutdown()
	Server() *netrpc.Server
}

Jump to

Keyboard shortcuts

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