greetertransport

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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

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

DecodeHTTPGreetingRequest method.

func DecodeHTTPHealthRequest

func DecodeHTTPHealthRequest(_ context.Context, _ *http.Request) (interface{}, error)

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

func NewHTTPHandler(endpoints greeterendpoint.Endpoints, logger log.Logger) http.Handler

NewHTTPHandler returns an HTTP handler that makes a set of endpoints available on predefined paths.

Types

This section is empty.

Jump to

Keyboard shortcuts

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