rpc

package
v0.0.0-...-bdc7756 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterType

func RegisterType(value interface{}) (err error)

Types

type Client

type Client struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewClient

func NewClient(network, addr string, maxIdleConns int) *Client

func (*Client) Close

func (c *Client) Close() error

func (*Client) MakeRpc

func (c *Client) MakeRpc(rpcName string, fptr interface{}) (err error)

type RpcError

type RpcError struct {
	Message string
}

func (RpcError) Error

func (r RpcError) Error() string

type Server

type Server struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewServer

func NewServer(network, addr string) *Server

func (*Server) Register

func (s *Server) Register(name string, f interface{}) (err error)

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stop

func (s *Server) Stop() error

Jump to

Keyboard shortcuts

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