Documentation ¶
Overview ¶
Package firstoutboundmiddleware annotates every outbound request with metadata like the request transport protocol. These metadata must be avilable to all subsequent middleware.
Index ¶
- type Middleware
- func (m *Middleware) Call(ctx context.Context, req *transport.Request, next transport.UnaryOutbound) (*transport.Response, error)
- func (m *Middleware) CallOneway(ctx context.Context, req *transport.Request, next transport.OnewayOutbound) (transport.Ack, error)
- func (m *Middleware) CallStream(ctx context.Context, req *transport.StreamRequest, ...) (*transport.ClientStream, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware struct{}
Middleware is the first middleware that MUST be executed in the chain of TransportOutboundMiddleware.
func New ¶
func New() *Middleware
New returns middleware to begin any YARPC outbound middleware chain.
func (*Middleware) Call ¶
func (m *Middleware) Call(ctx context.Context, req *transport.Request, next transport.UnaryOutbound) (*transport.Response, error)
Call implements middleware.UnaryOutbound.
func (*Middleware) CallOneway ¶
func (m *Middleware) CallOneway(ctx context.Context, req *transport.Request, next transport.OnewayOutbound) (transport.Ack, error)
CallOneway implements middleware.OnewayOutbound.
func (*Middleware) CallStream ¶
func (m *Middleware) CallStream(ctx context.Context, req *transport.StreamRequest, next transport.StreamOutbound) (*transport.ClientStream, error)
CallStream implements middleware.StreamOutbound.
Click to show internal directories.
Click to hide internal directories.