simple_rpc

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call

func Call(srv string, port int, rpcname string, args interface{}, reply interface{}) error

func ListenRPC

func ListenRPC(port int) error

func NewSimpleRpc

func NewSimpleRpc(host string, port int) proto.ISimpleRpc

func Pub

func Pub(srv string, port int, rpcname string, args interface{}, reply interface{}) error

func Regiseter

func Regiseter(rcvrs ...interface{}) error

func TimeoutCoder

func TimeoutCoder(f func(interface{}) error, e interface{}, msg string) error

Types

type SimpleRpc

type SimpleRpc struct {
	Host string
	Port int
}

func (*SimpleRpc) Call

func (sp *SimpleRpc) Call(rpcname string, args interface{}, reply interface{}) error

func (*SimpleRpc) ListenRPC

func (sp *SimpleRpc) ListenRPC() error

func (*SimpleRpc) Pub

func (sp *SimpleRpc) Pub(rpcname string, args interface{}, reply interface{}) error

func (*SimpleRpc) RegisterRpc

func (sp *SimpleRpc) RegisterRpc(rcvrs ...interface{}) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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