Documentation ¶
Index ¶
- Variables
- func DecodeRequestFromClient(log log.Logger) func(context.Context, interface{}) (interface{}, error)
- func DecodeResponseFromServer(log log.Logger) func(context.Context, interface{}) (interface{}, error)
- func DisplayClientRequestHeaders(logger log.Logger) func(context.Context, *metadata.MD) context.Context
- func DisplayClientResponseHeaders(logger log.Logger) func(context.Context, metadata.MD, metadata.MD) context.Context
- func DisplayClientResponseTrailers(logger log.Logger) func(context.Context, metadata.MD, metadata.MD) context.Context
- func EncodeRequestToServer(log log.Logger) func(context.Context, interface{}) (interface{}, error)
- func EncodeResponseToClient(log log.Logger) func(context.Context, interface{}) (interface{}, error)
- func ExtractConsumedCorrelationID(logger log.Logger) func(context.Context, metadata.MD, metadata.MD) context.Context
- func InjectCorrelationID(logger log.Logger) func(context.Context, *metadata.MD) context.Context
- func NewBinding(svc Service) *serverBinding
- func SetCorrelationID(ctx context.Context, v string) context.Context
- type Client
- type ClientOption
- type InternalReply
- type InternalRequest
- type RequestAndStreamHalfDuplex
- type Service
Constants ¶
This section is empty.
Variables ¶
View Source
var CloseCommunication = errors.New("communication end")
Functions ¶
func DecodeRequestFromClient ¶
func EncodeRequestToServer ¶
func EncodeResponseToClient ¶
func InjectCorrelationID ¶
func NewBinding ¶
func NewBinding(svc Service) *serverBinding
Types ¶
type Client ¶
func NewDirectClient ¶
func NewDirectClient( log log.Logger, conn *grpc.ClientConn, enc kitGRPC.EncodeRequestFunc, dec kitGRPC.DecodeResponseFunc) *Client
func (*Client) ApplyExtraOptions ¶
func (c *Client) ApplyExtraOptions(options ...ClientOption)
func (Client) CallHalfDuplex ¶
func (c Client) CallHalfDuplex(extCtx context.Context, request *InternalRequest) error
type ClientOption ¶
type ClientOption func(*Client)
func ClientAfter ¶
func ClientAfter(after ...kitGRPC.ClientResponseFunc) ClientOption
func ClientBefore ¶
func ClientBefore(before ...kitGRPC.ClientRequestFunc) ClientOption
type InternalReply ¶
type InternalRequest ¶
type InternalRequest struct {
Msg string
}
type RequestAndStreamHalfDuplex ¶
type RequestAndStreamHalfDuplex struct { Request *pb.Request Stream pb.Streams_HalfDuplexServer }
request and stream for half duplex
Source Files ¶
Click to show internal directories.
Click to hide internal directories.