func DefaultOpts() []grpc.ServerOption
DefaultOpts sets gRPC service options.
type ALSv2 struct { *GRPCALS }
func (als ALSv2) StreamAccessLogs(srv alsv2.AccessLogService_StreamAccessLogsServer) error
type ALSv3 struct { *GRPCALS }
func (als ALSv3) StreamAccessLogs(srv alsv3.AccessLogService_StreamAccessLogsServer) error
GRPC server object (all fields are required).
type GRPC struct { Port int16 Backend string SecurePort int16 SecureBackend string Cert string Key string pb.UnsafeEchoServiceServer }
func (g *GRPC) Echo(ctx context.Context, r *pb.EchoRequest) (*pb.EchoResponse, error)
Echo returns the an object with the HTTP context of the request.
func (g *GRPC) Start(ctx context.Context) <-chan bool
Start initializes the gRPC server.
type GRPCALS struct { HTTPListener // contains filtered or unexported fields }
func (als *GRPCALS) ServeLogs(w http.ResponseWriter, r *http.Request)
func (als *GRPCALS) Start(ctx context.Context) <-chan bool
GRPCAUTH server object (all fields are required).
type GRPCAUTH struct { Port int16 Backend string SecurePort int16 SecureBackend string Cert string Key string ProtocolVersion string }
func (g *GRPCAUTH) Check(ctx context.Context, r *pb.CheckRequest) (*pb.CheckResponse, error)
Check checks the request object.
func (g *GRPCAUTH) Start(ctx context.Context) <-chan bool
Start initializes the HTTP server.
GRPCAUTHV3 server object (all fields are required).
type GRPCAUTHV3 struct { Port int16 Backend string SecurePort int16 SecureBackend string Cert string Key string ProtocolVersion string }
func (g *GRPCAUTHV3) Check(ctx context.Context, r *pb.CheckRequest) (*pb.CheckResponse, error)
Check checks the request object.
func (g *GRPCAUTHV3) Start(ctx context.Context) <-chan bool
Start initializes the HTTP server.
type GRPCAgent struct { Port int16 }
func (a *GRPCAgent) Start(ctx context.Context) <-chan bool
GRPCRLS server object (all fields are required).
type GRPCRLS struct { Port int16 Backend string SecurePort int16 SecureBackend string Cert string Key string ProtocolVersion string }
func (g *GRPCRLS) ShouldRateLimit(ctx context.Context, r *pb.RateLimitRequest) (*pb.RateLimitResponse, error)
Check checks the request object.
func (g *GRPCRLS) Start(ctx context.Context) <-chan bool
Start initializes the HTTP server.
GRPCRLSV3 server object (all fields are required).
type GRPCRLSV3 struct { Port int16 Backend string SecurePort int16 SecureBackend string Cert string Key string ProtocolVersion string }
func (g *GRPCRLSV3) ShouldRateLimit(ctx context.Context, r *pb.RateLimitRequest) (*pb.RateLimitResponse, error)
Check checks the request object.
func (g *GRPCRLSV3) Start(ctx context.Context) <-chan bool
Start initializes the HTTP server.
HTTP server object (all fields are required).
type HTTP struct { Port int16 Backend string SecurePort int16 SecureBackend string Cert string Key string TLSVersion string }
func (h *HTTP) Start(ctx context.Context) <-chan bool
Start initializes the HTTP server.
type HTTPListener struct { CleartextPort int16 TLSPort int16 TLSCert string TLSKey string }
func (hl HTTPListener) Run(ctx context.Context, name string, httpHandler *http.ServeMux, grpcHandler *grpc.Server) <-chan bool
RLSResponse constructs an rls response object.
type RLSResponse struct {
// contains filtered or unexported fields
}
func (r *RLSResponse) AddHeader(a bool, k, v string)
AddHeader adds a header to the response. When append param is true, Envoy will append the value to an existent request header instead of overriding it.
func (r *RLSResponse) GetHTTPHeaderMap() *http.Header
GetHTTPHeaderMap returns HTTP header mapping of the response header-options.
func (r *RLSResponse) GetOverallCode() pb.RateLimitResponse_Code
GetOverallCode returns the rls response HTTP status code.
func (r *RLSResponse) GetResponse() *pb.RateLimitResponse
GetResponse returns the gRPC rls response object.
func (r *RLSResponse) SetBody(s string)
SetBody sets the rls response message body.
func (r *RLSResponse) SetOverallCode(code pb.RateLimitResponse_Code)
SetOverallCode sets the rls response HTTP status code.
RLSResponseV3 constructs an rls response object.
type RLSResponseV3 struct {
// contains filtered or unexported fields
}
func (r *RLSResponseV3) AddHeader(a bool, k, v string)
AddHeader adds a header to the response. When append param is true, Envoy will append the value to an existent request header instead of overriding it.
func (r *RLSResponseV3) GetHTTPHeaderMap() *http.Header
GetHTTPHeaderMap returns HTTP header mapping of the response header-options.
func (r *RLSResponseV3) GetOverallCode() pb.RateLimitResponse_Code
GetOverallCode returns the rls response HTTP status code.
func (r *RLSResponseV3) GetResponse() *pb.RateLimitResponse
GetResponse returns the gRPC rls response object.
func (r *RLSResponseV3) SetBody(s string)
SetBody sets the rls response message body.
func (r *RLSResponseV3) SetOverallCode(code pb.RateLimitResponse_Code)
SetOverallCode sets the rls response HTTP status code.
Response constructs an authorization response object.
type Response struct {
// contains filtered or unexported fields
}
func (r *Response) AddHeader(a bool, k, v string)
AddHeader adds a header to the response. When append param is true, Envoy will append the value to an existent request header instead of overriding it.
func (r *Response) GetHTTPHeaderMap() *http.Header
GetHTTPHeaderMap returns HTTP header mapping of the response header-options.
func (r *Response) GetResponse() *pb.CheckResponse
GetResponse returns the gRPC authorization response object.
func (r *Response) GetStatus() uint32
GetStatus returns the authorization response HTTP status code.
func (r *Response) SetBody(s string)
SetBody sets the authorization response message body.
func (r *Response) SetStatus(ctx context.Context, s string)
SetStatus sets the authorization response HTTP status code.
ResponseV3 constructs an authorization response object.
type ResponseV3 struct {
// contains filtered or unexported fields
}
func (r *ResponseV3) AddHeader(a bool, k, v string)
AddHeader adds a header to the response. When append param is true, Envoy will append the value to an existent request header instead of overriding it.
func (r *ResponseV3) GetHTTPHeaderMap() *http.Header
GetHTTPHeaderMap returns HTTP header mapping of the response header-options.
func (r *ResponseV3) GetResponse() *pb.CheckResponse
GetResponse returns the gRPC authorization response object.
func (r *ResponseV3) GetStatus() uint32
GetStatus returns the authorization response HTTP status code.
func (r *ResponseV3) SetBody(s string)
SetBody sets the authorization response message body.
func (r *ResponseV3) SetStatus(ctx context.Context, s string)
SetStatus sets the authorization response HTTP status code.
Service defines a KAT backend service interface.
type Service interface { Start(context.Context) <-chan bool }