Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter func(handlerFunc http.HandlerFunc) http.HandlerFunc
Adapter represents a middleware adapter
type Client ¶
type Client interface { Connect(context.Context, *url.URL) error CloseConn() error Call(context.Context, string, string, []byte, *metadata.Metadata, ) ([]byte, error) }
Client is a dynamic gRPC client that performs reflection
type Discoverer ¶
Discoverer performs service discover
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is an grpc-http-proxy server
func New ¶
func New(token string, discoverer Discoverer, logger *zap.Logger, ) *Server
New creates a new Server
func (*Server) CatchAllHandler ¶
func (s *Server) CatchAllHandler() http.HandlerFunc
CatchAllHandler handles requests for non-existing paths This is done explicitly in order to have the logger middleware log the fact
func (*Server) LivenessProbeHandler ¶
func (s *Server) LivenessProbeHandler() http.HandlerFunc
LivenessProbeHandler returns a status code 200 response for liveness probes
func (*Server) RPCCallHandler ¶
func (s *Server) RPCCallHandler(newClient func() Client) http.HandlerFunc
RPCCallHandler handles requests for making gRPC calls
Click to show internal directories.
Click to hide internal directories.