Documentation ¶
Index ¶
- Variables
- func DecodeHTTPGreetingRequest(_ context.Context, r *http.Request) (interface{}, error)
- func DecodeHTTPHealthRequest(_ context.Context, _ *http.Request) (interface{}, error)
- func EncodeHTTPGenericResponse(ctx context.Context, w http.ResponseWriter, response interface{}) error
- func NewGRPCServer(endpoints greeterendpoint.Endpoints, logger log.Logger) pb.GreeterServer
- func NewHTTPHandler(endpoints greeterendpoint.Endpoints, logger log.Logger) http.Handler
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrBadRouting is returned when an expected path variable is missing. ErrBadRouting = errors.New("inconsistent mapping between route and handler") )
Functions ¶
func DecodeHTTPGreetingRequest ¶
DecodeHTTPGreetingRequest method.
func DecodeHTTPHealthRequest ¶
DecodeHTTPHealthRequest method.
func EncodeHTTPGenericResponse ¶
func EncodeHTTPGenericResponse(ctx context.Context, w http.ResponseWriter, response interface{}) error
EncodeHTTPGenericResponse is a transport/http.EncodeResponseFunc that encodes the response as JSON to the response writer
func NewGRPCServer ¶
func NewGRPCServer(endpoints greeterendpoint.Endpoints, logger log.Logger) pb.GreeterServer
NewGRPCServer makes a set of endpoints available as a gRPC GreeterServer.
func NewHTTPHandler ¶
NewHTTPHandler returns an HTTP handler that makes a set of endpoints available on predefined paths.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.