http

package
v0.0.0-...-6c74aba Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2020 License: Unlicense Imports: 15 Imported by: 0

Documentation

Overview

Package http provides an HTTP client for the Echo service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CtxValuesToSend

func CtxValuesToSend(keys ...string) httptransport.ClientOption

CtxValuesToSend configures the http client to pull the specified keys out of the context and add them to the http request as headers. Note that keys will have net/http.CanonicalHeaderKey called on them before being send over the wire and that is the form they will be available in the server context.

func DecodeHTTPEchoResponse

func DecodeHTTPEchoResponse(_ context.Context, r *http.Response) (interface{}, error)

DecodeHTTPEchoResponse is a transport/http.DecodeResponseFunc that decodes a JSON-encoded EchoResponse response from the HTTP response body. If the response has a non-200 status code, we will interpret that as an error and attempt to decode the specific error message from the response body. Primarily useful in a client.

func DecodeHTTPLouderGetResponse

func DecodeHTTPLouderGetResponse(_ context.Context, r *http.Response) (interface{}, error)

DecodeHTTPLouderGetResponse is a transport/http.DecodeResponseFunc that decodes a JSON-encoded EchoResponse response from the HTTP response body. If the response has a non-200 status code, we will interpret that as an error and attempt to decode the specific error message from the response body. Primarily useful in a client.

func DecodeHTTPLouderResponse

func DecodeHTTPLouderResponse(_ context.Context, r *http.Response) (interface{}, error)

DecodeHTTPLouderResponse is a transport/http.DecodeResponseFunc that decodes a JSON-encoded EchoResponse response from the HTTP response body. If the response has a non-200 status code, we will interpret that as an error and attempt to decode the specific error message from the response body. Primarily useful in a client.

func EncodeHTTPEchoOneRequest

func EncodeHTTPEchoOneRequest(_ context.Context, r *http.Request, request interface{}) error

EncodeHTTPEchoOneRequest is a transport/http.EncodeRequestFunc that encodes a echo request into the various portions of the http request (path, query, and body).

func EncodeHTTPEchoZeroRequest

func EncodeHTTPEchoZeroRequest(_ context.Context, r *http.Request, request interface{}) error

EncodeHTTPEchoZeroRequest is a transport/http.EncodeRequestFunc that encodes a echo request into the various portions of the http request (path, query, and body).

func EncodeHTTPLouderGetZeroRequest

func EncodeHTTPLouderGetZeroRequest(_ context.Context, r *http.Request, request interface{}) error

EncodeHTTPLouderGetZeroRequest is a transport/http.EncodeRequestFunc that encodes a louderget request into the various portions of the http request (path, query, and body).

func EncodeHTTPLouderOneRequest

func EncodeHTTPLouderOneRequest(_ context.Context, r *http.Request, request interface{}) error

EncodeHTTPLouderOneRequest is a transport/http.EncodeRequestFunc that encodes a louder request into the various portions of the http request (path, query, and body).

func EncodeHTTPLouderZeroRequest

func EncodeHTTPLouderZeroRequest(_ context.Context, r *http.Request, request interface{}) error

EncodeHTTPLouderZeroRequest is a transport/http.EncodeRequestFunc that encodes a louder request into the various portions of the http request (path, query, and body).

func New

func New(instance string, options ...httptransport.ClientOption) (pb.EchoServer, error)

New returns a service backed by an HTTP server living at the remote instance. We expect instance to come from a service discovery system, so likely of the form "host:port".

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL