Documentation ¶
Overview ¶
Package ecommerce is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterProductInfoHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterProductInfoHandlerClient(ctx context.Context, mux *runtime.ServeMux, client pb.ProductInfoClient) error
- func RegisterProductInfoHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterProductInfoHandlerServer(ctx context.Context, mux *runtime.ServeMux, server pb.ProductInfoServer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterProductInfoHandler ¶
func RegisterProductInfoHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterProductInfoHandler registers the http handlers for service ProductInfo to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterProductInfoHandlerClient ¶
func RegisterProductInfoHandlerClient(ctx context.Context, mux *runtime.ServeMux, client pb.ProductInfoClient) error
RegisterProductInfoHandlerClient registers the http handlers for service ProductInfo to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ProductInfoClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ProductInfoClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ProductInfoClient" to call the correct interceptors.
func RegisterProductInfoHandlerFromEndpoint ¶
func RegisterProductInfoHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterProductInfoHandlerFromEndpoint is same as RegisterProductInfoHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterProductInfoHandlerServer ¶
func RegisterProductInfoHandlerServer(ctx context.Context, mux *runtime.ServeMux, server pb.ProductInfoServer) error
RegisterProductInfoHandlerServer registers the http handlers for service ProductInfo to "mux". UnaryRPC :call ProductInfoServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
Types ¶
This section is empty.