client

package
v0.0.0-...-039e74a Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// Call calls an RPC.  This runs synchronously, and may be canceled
	// via the context.  It is possible for multiple outstanding calls
	// to be posted this way.  The args may be nil, or an array or a
	// a structure.  The results are either nil (for a method that has
	// no return), or a pointer to a structure that can be unmarshaled.
	//
	// The expectation is that type safe wrappers will be provided
	// by service packages.
	Call(ctx context.Context, name string, args interface{}, results interface{}) error

	// Dial is used to dial a remote server.  This may be called multiple
	// times to dial to different servers.  If multiple connections are
	// present, then the rpcClient will automatically select the best
	// one based on readiness to service the request.
	Dial(url string, opts ...interface{}) error

	// Listen is much like dial, but acts as a server.  This allows
	// the normal TCP server/rpcClient roles to be reversed while still
	// maintaining the REQ/REP higher level roles.  It is possible
	// to freely mix and match multiple calls of Listen, with or without
	// calls to Dial.
	Listen(url string, opts ...interface{}) error

	// SetOption sets global options on the rpcClient, such as retry times.
	SetOption(opts ...interface{}) error

	// Close closes down the socket.  In-flight requests will be aborted
	// and return accordingly.
	Close()
}

func NewClient

func NewClient() Client

type Error

type Error = rpc.Error

type Nil

type Nil = rome.Nil

type OptionDialAsync

type OptionDialAsync = rome.OptionDialAsync

type OptionMaxReconnectTime

type OptionMaxReconnectTime = rome.OptionMaxReconnectTime

type OptionOther

type OptionOther = rome.OptionOther

type OptionReconnectTime

type OptionReconnectTime = rome.OptionReconnectTime

type OptionRetryTime

type OptionRetryTime = rome.OptionRetryTime

type OptionTLSConfig

type OptionTLSConfig = rome.OptionTLSConfig

Jump to

Keyboard shortcuts

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