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 GrpcClient ¶
type GrpcClient interface { IsReady() bool Invoke(ctx context.Context, serviceName string, methodName string, message []byte, md *metadata.Metadata, ) (response []byte, err error) Introspect() (response []byte, err error) }
GrpcClient is a dynamic gRPC client that performs reflection
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a grpc-mate server
func New ¶
func New(grpcClient GrpcClient, logger *zap.Logger) *Server
New creates a new grpc-mate 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) HealthCheckHandler ¶
func (s *Server) HealthCheckHandler() http.HandlerFunc
HealthCheckHandler returns a status code 200 response for liveness probes
func (*Server) IntrospectHandler ¶
func (s *Server) IntrospectHandler(client GrpcClient) http.HandlerFunc
IntrospectHandler handles requests that introspects all services and types
func (*Server) RPCCallHandler ¶
func (s *Server) RPCCallHandler(client GrpcClient) http.HandlerFunc
RPCCallHandler handles requests for making gRPC calls
Click to show internal directories.
Click to hide internal directories.