rpc

package
v0.0.0-...-144358a Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2014 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const CommandChannelBufferSize = 1000

Variables

View Source
var (
	ErrTerminated       = &services.ErrTerminated{"inproc RPC transport"}
	ErrDuplicateRequest = errors.New("duplicate request ID")
	ErrResolved         = errors.New("request already resolved")
)

Functions

This section is empty.

Types

type Transport

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

Transport implements client.Transport so it can be used as the underlying transport for a Meeko client instance.

This particular transport is a bit special. It implements inproc transport that uses channels. It is suitable for clients that intend to live in the same process as Meeko.

For using Transport as a service Endpoint for the Meeko broker, check the AsEndpoint method.

func NewTransport

func NewTransport(identity string, exchange rpc.Exchange) *Transport

NewTransport creates a new Transport instance.

func (*Transport) AsEndpoint

func (t *Transport) AsEndpoint() rpc.Endpoint

AsEndpoint returns an adapter that makes Transport look like rpc.Endpoint.

func (*Transport) Call

func (t *Transport) Call(cmd client.CallCmd)

func (*Transport) Close

func (t *Transport) Close() error

func (*Transport) Closed

func (t *Transport) Closed() <-chan struct{}

func (*Transport) ErrorChan

func (t *Transport) ErrorChan() <-chan error

func (*Transport) Interrupt

func (t *Transport) Interrupt(cmd client.InterruptCmd)

func (*Transport) ProgressChan

func (t *Transport) ProgressChan() <-chan client.RequestID

func (*Transport) RegisterMethod

func (t *Transport) RegisterMethod(cmd client.RegisterCmd)

func (*Transport) ReplyChan

func (t *Transport) ReplyChan() <-chan client.RemoteCallReply

func (*Transport) RequestChan

func (t *Transport) RequestChan() <-chan client.RemoteRequest

func (*Transport) StreamFrameChan

func (t *Transport) StreamFrameChan() <-chan client.StreamFrame

func (*Transport) UnregisterMethod

func (t *Transport) UnregisterMethod(cmd client.UnregisterCmd)

func (*Transport) Wait

func (t *Transport) Wait() error

Jump to

Keyboard shortcuts

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