proto

package
v0.0.0-...-b3ab350 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: CC-BY-4.0 Imports: 12 Imported by: 0

Documentation

Overview

Package ecommerce is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

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.

Jump to

Keyboard shortcuts

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