grpc

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2017 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package grpc implements the grpc transport.

This package is experimental and should not be used in production.

Index

Constants

View Source
const UserAgent = "yarpc-go/" + yarpc.Version

UserAgent is the User-Agent that will be set for requests. http://www.grpc.io/docs/guides/wire.html#user-agents

Variables

This section is empty.

Functions

This section is empty.

Types

type Inbound

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

Inbound is a grpc transport.Inbound.

func NewInbound

func NewInbound(listener net.Listener, options ...InboundOption) *Inbound

NewInbound returns a new Inbound for the given listener.

func (*Inbound) IsRunning

func (i *Inbound) IsRunning() bool

IsRunning implements transport.Lifecycle#IsRunning.

func (*Inbound) SetRouter

func (i *Inbound) SetRouter(router transport.Router)

SetRouter implements transport.Inbound#SetRouter.

func (*Inbound) Start

func (i *Inbound) Start() error

Start implements transport.Lifecycle#Start.

func (*Inbound) Stop

func (i *Inbound) Stop() error

Stop implements transport.Lifecycle#Stop.

func (*Inbound) Transports

func (i *Inbound) Transports() []transport.Transport

Transports implements transport.Inbound#Transports.

type InboundOption

type InboundOption func(*inboundOptions)

InboundOption is an option for an inbound.

func WithInboundTracer

func WithInboundTracer(tracer opentracing.Tracer) InboundOption

WithInboundTracer specifies the tracer to use for an inbound.

type Outbound

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

Outbound is a transport.UnaryOutbound.

func NewSingleOutbound

func NewSingleOutbound(address string, options ...OutboundOption) *Outbound

NewSingleOutbound returns a new Outbound for the given adrress.

func (*Outbound) Call

func (o *Outbound) Call(ctx context.Context, request *transport.Request) (*transport.Response, error)

Call implements transport.UnaryOutbound#Call.

func (*Outbound) IsRunning

func (o *Outbound) IsRunning() bool

IsRunning implements transport.Lifecycle#IsRunning.

func (*Outbound) Start

func (o *Outbound) Start() error

Start implements transport.Lifecycle#Start.

func (*Outbound) Stop

func (o *Outbound) Stop() error

Stop implements transport.Lifecycle#Stop.

func (*Outbound) Transports

func (o *Outbound) Transports() []transport.Transport

Transports implements transport.Inbound#Transports.

type OutboundOption

type OutboundOption func(*outboundOptions)

OutboundOption is an option for an outbound.

func WithOutboundTracer

func WithOutboundTracer(tracer opentracing.Tracer) OutboundOption

WithOutboundTracer specifies the tracer to use for an outbound.

Jump to

Keyboard shortcuts

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