Documentation ¶
Index ¶
- func DefaultOpts() []grpc.ServerOption
- type ALSv2
- type ALSv3
- type GRPC
- type GRPCALS
- type GRPCAgent
- type GRPCAuthV2
- type GRPCAuthV3
- type GRPCRLSV2
- type GRPCRLSV3
- type HTTP
- type HTTPListener
- type HealthCheckServer
- type RLSResponseV2
- func (r *RLSResponseV2) AddHeader(a bool, k, v string)
- func (r *RLSResponseV2) GetHTTPHeaderMap() *http.Header
- func (r *RLSResponseV2) GetOverallCode() pb.RateLimitResponse_Code
- func (r *RLSResponseV2) GetResponse() *pb.RateLimitResponse
- func (r *RLSResponseV2) SetBody(s string)
- func (r *RLSResponseV2) SetOverallCode(code pb.RateLimitResponse_Code)
- type RLSResponseV3
- func (r *RLSResponseV3) AddHeader(a bool, k, v string)
- func (r *RLSResponseV3) GetHTTPHeaderMap() *http.Header
- func (r *RLSResponseV3) GetOverallCode() pb.RateLimitResponse_Code
- func (r *RLSResponseV3) GetResponse() *pb.RateLimitResponse
- func (r *RLSResponseV3) SetBody(s string)
- func (r *RLSResponseV3) SetOverallCode(code pb.RateLimitResponse_Code)
- type ResponseV2
- type ResponseV3
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ALSv2 ¶
type ALSv2 struct {
*GRPCALS
}
func (ALSv2) StreamAccessLogs ¶
func (als ALSv2) StreamAccessLogs(srv alsv2.AccessLogService_StreamAccessLogsServer) error
type ALSv3 ¶
type ALSv3 struct {
*GRPCALS
}
func (ALSv3) StreamAccessLogs ¶
func (als ALSv3) StreamAccessLogs(srv alsv3.AccessLogService_StreamAccessLogsServer) error
type GRPC ¶
type GRPC struct { Port int16 Backend string SecurePort int16 SecureBackend string Cert string Key string pb.UnsafeEchoServiceServer }
GRPC server object (all fields are required).
func (*GRPC) Echo ¶
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.
type GRPCALS ¶
type GRPCALS struct { HTTPListener // contains filtered or unexported fields }
type GRPCAuthV2 ¶
type GRPCAuthV2 struct { Port int16 Backend string SecurePort int16 SecureBackend string Cert string Key string ProtocolVersion string }
GRPCAuthV2 server object (all fields are required).
func (*GRPCAuthV2) Check ¶
func (g *GRPCAuthV2) Check(ctx context.Context, r *pb.CheckRequest) (*pb.CheckResponse, error)
Check checks the request object.
type GRPCAuthV3 ¶
type GRPCAuthV3 struct { Port int16 Backend string SecurePort int16 SecureBackend string Cert string Key string ProtocolVersion string }
GRPCAuthV3 server object (all fields are required).
func (*GRPCAuthV3) Check ¶
func (g *GRPCAuthV3) Check(ctx context.Context, r *pb.CheckRequest) (*pb.CheckResponse, error)
Check checks the request object.
type GRPCRLSV2 ¶
type GRPCRLSV2 struct { Port int16 Backend string SecurePort int16 SecureBackend string Cert string Key string ProtocolVersion string }
GRPCRLSV2 server object (all fields are required).
func (*GRPCRLSV2) ShouldRateLimit ¶
func (g *GRPCRLSV2) ShouldRateLimit(ctx context.Context, r *pb.RateLimitRequest) (*pb.RateLimitResponse, error)
Check checks the request object.
type GRPCRLSV3 ¶
type GRPCRLSV3 struct { Port int16 Backend string SecurePort int16 SecureBackend string Cert string Key string ProtocolVersion string }
GRPCRLSV3 server object (all fields are required).
func (*GRPCRLSV3) ShouldRateLimit ¶
func (g *GRPCRLSV3) ShouldRateLimit(ctx context.Context, r *pb.RateLimitRequest) (*pb.RateLimitResponse, error)
Check checks the request object.
type HTTP ¶
type HTTP struct { Port int16 Backend string SecurePort int16 SecureBackend string Cert string Key string TLSVersion string }
HTTP server object (all fields are required).
type HTTPListener ¶
type HealthCheckServer ¶ added in v3.4.0
type HealthCheckServer struct { Port int16 Backend string SecurePort int16 SecureBackend string Cert string Key string TLSVersion string Healthy bool HealthyStatusCode int UnhealthyStatusCode int }
HTTP server object (all fields are required).
type RLSResponseV2 ¶
type RLSResponseV2 struct {
// contains filtered or unexported fields
}
RLSResponseV2 constructs an rls response object.
func (*RLSResponseV2) AddHeader ¶
func (r *RLSResponseV2) 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 (*RLSResponseV2) GetHTTPHeaderMap ¶
func (r *RLSResponseV2) GetHTTPHeaderMap() *http.Header
GetHTTPHeaderMap returns HTTP header mapping of the response header-options.
func (*RLSResponseV2) GetOverallCode ¶
func (r *RLSResponseV2) GetOverallCode() pb.RateLimitResponse_Code
GetOverallCode returns the rls response HTTP status code.
func (*RLSResponseV2) GetResponse ¶
func (r *RLSResponseV2) GetResponse() *pb.RateLimitResponse
GetResponse returns the gRPC rls response object.
func (*RLSResponseV2) SetBody ¶
func (r *RLSResponseV2) SetBody(s string)
SetBody sets the rls response message body.
func (*RLSResponseV2) SetOverallCode ¶
func (r *RLSResponseV2) SetOverallCode(code pb.RateLimitResponse_Code)
SetOverallCode sets the rls response HTTP status code.
type RLSResponseV3 ¶
type RLSResponseV3 struct {
// contains filtered or unexported fields
}
RLSResponseV3 constructs an rls response object.
func (*RLSResponseV3) AddHeader ¶
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 (*RLSResponseV3) GetHTTPHeaderMap ¶
func (r *RLSResponseV3) GetHTTPHeaderMap() *http.Header
GetHTTPHeaderMap returns HTTP header mapping of the response header-options.
func (*RLSResponseV3) GetOverallCode ¶
func (r *RLSResponseV3) GetOverallCode() pb.RateLimitResponse_Code
GetOverallCode returns the rls response HTTP status code.
func (*RLSResponseV3) GetResponse ¶
func (r *RLSResponseV3) GetResponse() *pb.RateLimitResponse
GetResponse returns the gRPC rls response object.
func (*RLSResponseV3) SetBody ¶
func (r *RLSResponseV3) SetBody(s string)
SetBody sets the rls response message body.
func (*RLSResponseV3) SetOverallCode ¶
func (r *RLSResponseV3) SetOverallCode(code pb.RateLimitResponse_Code)
SetOverallCode sets the rls response HTTP status code.
type ResponseV2 ¶
type ResponseV2 struct {
// contains filtered or unexported fields
}
ResponseV2 constructs an authorization response object.
func (*ResponseV2) AddHeader ¶
func (r *ResponseV2) 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 (*ResponseV2) GetHTTPHeaderMap ¶
func (r *ResponseV2) GetHTTPHeaderMap() *http.Header
GetHTTPHeaderMap returns HTTP header mapping of the response header-options.
func (*ResponseV2) GetResponse ¶
func (r *ResponseV2) GetResponse() *pb.CheckResponse
GetResponse returns the gRPC authorization response object.
func (*ResponseV2) GetStatus ¶
func (r *ResponseV2) GetStatus() uint32
GetStatus returns the authorization response HTTP status code.
func (*ResponseV2) SetBody ¶
func (r *ResponseV2) SetBody(s string)
SetBody sets the authorization response message body.
type ResponseV3 ¶
type ResponseV3 struct {
// contains filtered or unexported fields
}
ResponseV3 constructs an authorization response object.
func (*ResponseV3) AddHeader ¶
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 (*ResponseV3) GetHTTPHeaderMap ¶
func (r *ResponseV3) GetHTTPHeaderMap() *http.Header
GetHTTPHeaderMap returns HTTP header mapping of the response header-options.
func (*ResponseV3) GetResponse ¶
func (r *ResponseV3) GetResponse() *pb.CheckResponse
GetResponse returns the gRPC authorization response object.
func (*ResponseV3) GetStatus ¶
func (r *ResponseV3) GetStatus() uint32
GetStatus returns the authorization response HTTP status code.
func (*ResponseV3) SetBody ¶
func (r *ResponseV3) SetBody(s string)
SetBody sets the authorization response message body.