Documentation ¶
Index ¶
Constants ¶
const ( HealthzPath = "/healthz" HealthzPort = 10004 )
const EnvoyXRequestID = "x-request-id"
EnvoyXRequestID is the header name for the request id
Variables ¶
This section is empty.
Functions ¶
func NewHealthServer ¶
NewHealthServer creates a new health server.
func PropagateRequestID ¶
func PropagateRequestID( ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler, ) (interface{}, error)
PropagateRequestID is a gRPC middleware that propagates the request id from an Envoy CheckRequest to the logging context.
Types ¶
type ExtAuthZFilter ¶
type ExtAuthZFilter struct {
// contains filtered or unexported fields
}
ExtAuthZFilter is an implementation of the Envoy AuthZ filter.
func NewExtAuthZFilter ¶
func NewExtAuthZFilter(cfg *configv1.Config, tlsPool internal.TLSConfigPool, jwks oidc.JWKSProvider, sessions oidc.SessionStoreFactory) *ExtAuthZFilter
NewExtAuthZFilter creates a new ExtAuthZFilter.
func (*ExtAuthZFilter) Check ¶
func (e *ExtAuthZFilter) Check(ctx context.Context, req *envoy.CheckRequest) (response *envoy.CheckResponse, err error)
Check is the implementation of the Envoy AuthorizationServer interface.
func (*ExtAuthZFilter) Register ¶
func (e *ExtAuthZFilter) Register(server *grpc.Server)
Register the ExtAuthZFilter with the given gRPC server.
type LogMiddleware ¶
type LogMiddleware struct {
// contains filtered or unexported fields
}
LogMiddleware is a gRPC middleware that logs all the requests and responses.
func NewLogMiddleware ¶
func NewLogMiddleware() LogMiddleware
NewLogMiddleware creates a new LogMiddleware that logs all gRPC requests and responses.
func (LogMiddleware) UnaryServerInterceptor ¶
func (l LogMiddleware) UnaryServerInterceptor( ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler, ) (interface{}, error)
UnaryServerInterceptor is a grpc.UnaryServerInterceptor that logs all the server requests and responses.
type RegisterGrpc ¶
type RegisterGrpc interface { // Register a gRPC handler in the given server. Register(s *grpc.Server) }
RegisterGrpc is an interface for registering gRPC registerHandlers.
type Server ¶
type Server struct { // Listen allows overriding the default listener. It is meant to // be used in tests. Listen func() (net.Listener, error) // contains filtered or unexported fields }
Server that runs as a unit in a run.Group.