Documentation ¶
Overview ¶
Package grpc implements the grpc transport.
This package is experimental and should not be used in production.
Index ¶
Constants ¶
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) Transports ¶
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) Transports ¶
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.