Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterExternalProcessorServer(s grpc.ServiceRegistrar, srv ExternalProcessorServer)
- type ExternalProcessorClient
- type ExternalProcessorServer
- type ExternalProcessor_ProcessClient
- type ExternalProcessor_ProcessServer
- type UnimplementedExternalProcessorServer
- type UnsafeExternalProcessorServer
Constants ¶
const (
ExternalProcessor_Process_FullMethodName = "/envoy.service.ext_proc.v3.ExternalProcessor/Process"
)
Variables ¶
var ExternalProcessor_ServiceDesc = grpc.ServiceDesc{ ServiceName: "envoy.service.ext_proc.v3.ExternalProcessor", HandlerType: (*ExternalProcessorServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Process", Handler: _ExternalProcessor_Process_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "envoy/service/ext_proc/v3/external_processor.proto", }
ExternalProcessor_ServiceDesc is the grpc.ServiceDesc for ExternalProcessor service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterExternalProcessorServer ¶
func RegisterExternalProcessorServer(s grpc.ServiceRegistrar, srv ExternalProcessorServer)
Types ¶
type ExternalProcessorClient ¶
type ExternalProcessorClient interface {
// This begins the bidirectional stream that the data plane will use to
// give the server control over what the filter does. The actual
// protocol is described by the ProcessingRequest and ProcessingResponse
// messages below.
Process(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[v3.ProcessingRequest, v3.ProcessingResponse], error)
}
ExternalProcessorClient is the client API for ExternalProcessor service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
A service that can access and modify HTTP requests and responses as part of a filter chain. The overall external processing protocol works like this:
- The data plane sends to the service information about the HTTP request.
- The service sends back a ProcessingResponse message that directs the data plane to either stop processing, continue without it, or send it the next chunk of the message body.
- If so requested, the data plane sends the server the message body in chunks, or the entire body at once. In either case, the server may send back a ProcessingResponse for each message it receives, or wait for a certain amount of body chunks received before streaming back the ProcessingResponse messages.
- If so requested, the data plane sends the server the HTTP trailers, and the server sends back a ProcessingResponse.
- At this point, request processing is done, and we pick up again at step 1 when the data plane receives a response from the upstream server.
- At any point above, if the server closes the gRPC stream cleanly, then the data plane proceeds without consulting the server.
- At any point above, if the server closes the gRPC stream with an error, then the data plane returns a 500 error to the client, unless the filter was configured to ignore errors.
In other words, the process is a request/response conversation, but using a gRPC stream to make it easier for the server to maintain state.
func NewExternalProcessorClient ¶
func NewExternalProcessorClient(cc grpc.ClientConnInterface) ExternalProcessorClient
type ExternalProcessorServer ¶
type ExternalProcessorServer interface {
// This begins the bidirectional stream that the data plane will use to
// give the server control over what the filter does. The actual
// protocol is described by the ProcessingRequest and ProcessingResponse
// messages below.
Process(grpc.BidiStreamingServer[v3.ProcessingRequest, v3.ProcessingResponse]) error
}
ExternalProcessorServer is the server API for ExternalProcessor service. All implementations should embed UnimplementedExternalProcessorServer for forward compatibility.
A service that can access and modify HTTP requests and responses as part of a filter chain. The overall external processing protocol works like this:
- The data plane sends to the service information about the HTTP request.
- The service sends back a ProcessingResponse message that directs the data plane to either stop processing, continue without it, or send it the next chunk of the message body.
- If so requested, the data plane sends the server the message body in chunks, or the entire body at once. In either case, the server may send back a ProcessingResponse for each message it receives, or wait for a certain amount of body chunks received before streaming back the ProcessingResponse messages.
- If so requested, the data plane sends the server the HTTP trailers, and the server sends back a ProcessingResponse.
- At this point, request processing is done, and we pick up again at step 1 when the data plane receives a response from the upstream server.
- At any point above, if the server closes the gRPC stream cleanly, then the data plane proceeds without consulting the server.
- At any point above, if the server closes the gRPC stream with an error, then the data plane returns a 500 error to the client, unless the filter was configured to ignore errors.
In other words, the process is a request/response conversation, but using a gRPC stream to make it easier for the server to maintain state.
type ExternalProcessor_ProcessClient ¶
type ExternalProcessor_ProcessClient = grpc.BidiStreamingClient[v3.ProcessingRequest, v3.ProcessingResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type ExternalProcessor_ProcessServer ¶
type ExternalProcessor_ProcessServer = grpc.BidiStreamingServer[v3.ProcessingRequest, v3.ProcessingResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type UnimplementedExternalProcessorServer ¶
type UnimplementedExternalProcessorServer struct{}
UnimplementedExternalProcessorServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedExternalProcessorServer) Process ¶
type UnsafeExternalProcessorServer ¶
type UnsafeExternalProcessorServer interface {
// contains filtered or unexported methods
}
UnsafeExternalProcessorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ExternalProcessorServer will result in compilation errors.
Source Files
¶
- external_processor_grpc.pb.go