Versions in this module Expand all Collapse all v0 v0.1.0 Jul 2, 2020 Changes in this version + var ErrSessionIDNotDefined = errors.New("session id not defined") + func InjectSessionID(sid uuid.UUID, ctx context.Context) context.Context + type Client struct + func NewClient(wire wirenet.Wire, streamName string, enc EncodeRequestFunc, ...) *Client + func (c Client) Endpoint() endpoint.Endpoint + type ClientCodec func(context.Context, interface{}, wirenet.Stream) (interface{}, error) + type ClientOption func(*Client) + func ClientBefore(before ...ClientRequestFunc) ClientOption + type ClientRequestFunc func(context.Context) context.Context + func SetSessionID(sid uuid.UUID) ClientRequestFunc + type ContextKeySessionID struct + type DecodeRequestFunc func(context.Context, io.ReadCloser) (request interface{}, err error) + type DecodeResponseFunc func(context.Context, io.ReadCloser) (response interface{}, err error) + type EncodeRequestFunc func(context.Context, interface{}, io.WriteCloser) error + type EncodeResponseFunc func(context.Context, interface{}, io.WriteCloser) error + type Server struct + func NewServer(e endpoint.Endpoint, dec DecodeRequestFunc, enc EncodeResponseFunc, ...) *Server + func (s Server) Handle(ctx context.Context, stream wirenet.Stream) + type ServerCodec func(context.Context, wirenet.Stream) (interface{}, error) + type ServerOption func(*Server) + func ServerBefore(before ...ServerRequestFunc) ServerOption + func ServerErrorHandler(errorHandler transport.ErrorHandler) ServerOption + type ServerRequestFunc func(context.Context) context.Context + type StreamClient struct + func NewStreamClient(wire wirenet.Wire, streamName string, codec ClientCodec, ...) *StreamClient + func (c StreamClient) Endpoint() endpoint.Endpoint + type StreamClientOption func(*StreamClient) + func StreamClientBefore(before ...ClientRequestFunc) StreamClientOption + type StreamServer struct + func NewStreamServer(e endpoint.Endpoint, codec ServerCodec, options ...StreamServerOption) *StreamServer + func (s StreamServer) Handle(ctx context.Context, stream wirenet.Stream) + type StreamServerOption func(*StreamServer) + func StreamServerBefore(before ...ServerRequestFunc) StreamServerOption + func StreamServerErrorHandler(errorHandler transport.ErrorHandler) StreamServerOption