rpc

package
v0.0.0-...-0cd06db Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CodecHandle

func CodecHandle(types []reflect.Type) codec.Handle

Types

type ClientProxy

type ClientProxy struct {
	RecordedReqs []RecordedRequest
	// contains filtered or unexported fields
}

func NewClientProxy

func NewClientProxy(serverAddr string, useTLS bool, usePersistent bool, types []reflect.Type) (*ClientProxy, error)

func (*ClientProxy) Call

func (p *ClientProxy) Call(serviceMethod string, args interface{}, reply interface{}) error

func (*ClientProxy) Close

func (p *ClientProxy) Close()

func (*ClientProxy) StartRecording

func (p *ClientProxy) StartRecording()

func (*ClientProxy) StopRecording

func (p *ClientProxy) StopRecording() []RecordedRequest

type RecordedRequest

type RecordedRequest struct {
	Method   string
	ReqBody  interface{}
	Error    error
	RespBody interface{}
}

type Server

type Server interface {
	RegisterName(name string, rcvr interface{}) error
	Serve() error
	Close() error
}

func NewServer

func NewServer(port int, useTLS bool, types []reflect.Type) (Server, error)

Jump to

Keyboard shortcuts

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