client

package
v0.0.0-...-7592eae Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2022 License: GPL-3.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrReturnNotChannel = errors.New("function call returns channel but return value is not a channel type")
	ErrReturnNotPointer = errors.New("function call returns value but return value is not a pointer")
	ErrMismatchedType   = errors.New("type of channel does not match type returned by server")
)

Client error values

Functions

This section is empty.

Types

type Client

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

Client is an lrpc client

func New

func New(conn io.ReadWriteCloser, cf codec.CodecFunc) *Client

New creates and returns a new client

func (*Client) Call

func (c *Client) Call(ctx context.Context, rcvr, method string, arg interface{}, ret interface{}) error

Call calls a method on the server

func (*Client) Close

func (c *Client) Close() error

Close closes the client

Jump to

Keyboard shortcuts

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