Versions in this module Expand all Collapse all v0 v0.1.1 Aug 26, 2022 Changes in this version + func CodecForResponse(r *http.Response) encoding.Codec + func ContentSubtype(contentType string) string + func DefaultErrorDecoder(ctx context.Context, res *http.Response) error + func DefaultRequestEncoder(ctx context.Context, contentType string, in interface{}) ([]byte, error) + func DefaultResponseDecoder(ctx context.Context, res *http.Response, v interface{}) error + type Client struct + func NewClient(opts ...ClientOption) (*Client, error) + func (client *Client) BuildRequest(ctx context.Context, method, path, contentType string, args interface{}) (*http.Request, error) + func (client *Client) BuildResponse(ctx context.Context, res *http.Response, reply interface{}) error + func (client *Client) Do(req *http.Request) (*http.Response, error) + func (client *Client) Get(ctx context.Context, path string, reply interface{}) error + func (client *Client) Invoke(ctx context.Context, method, path, contentType string, args interface{}, ...) error + func (client *Client) Post(ctx context.Context, path string, contentType string, args, reply interface{}) error + type ClientOption func(*clientOptions) + func WithEndpoint(endpoint string) ClientOption + func WithErrorDecoder(errorDecoder DecodeErrorFunc) ClientOption + func WithRequestEncoder(encoder EncodeRequestFunc) ClientOption + func WithResponseDecoder(decoder DecodeResponseFunc) ClientOption + func WithTimeout(timeout time.Duration) ClientOption + func WithTlsConfig(cfg *tls.Config) ClientOption + func WithTransport(trans *http.Transport) ClientOption + func WithUserAgent(userAgent string) ClientOption + type DecodeErrorFunc func(ctx context.Context, res *http.Response) error + type DecodeResponseFunc func(ctx context.Context, res *http.Response, out interface{}) error + type EncodeRequestFunc func(ctx context.Context, contentType string, in interface{}) (body []byte, err error) + type Server struct + func NewServer(hs *http.Server, name string) *Server + func (s *Server) Close(ctx context.Context) error + func (s *Server) Name() string + func (s *Server) Run() error