Interface ExternalProcessorGrpc.AsyncService

All Known Implementing Classes:
ExternalProcessorGrpc.ExternalProcessorImplBase
Enclosing class:
ExternalProcessorGrpc

public static interface ExternalProcessorGrpc.AsyncService
 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:
 1. Envoy sends to the service information about the HTTP request.
 2. The service sends back a ProcessingResponse message that directs Envoy
    to either stop processing, continue without it, or send it the
    next chunk of the message body.
 3. If so requested, Envoy 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 certain amount
    of body chunks received before streams back the ProcessingResponse messages.
 4. If so requested, Envoy sends the server the HTTP trailers,
    and the server sends back a ProcessingResponse.
 5. At this point, request processing is done, and we pick up again
    at step 1 when Envoy receives a response from the upstream server.
 6. At any point above, if the server closes the gRPC stream cleanly,
    then Envoy proceeds without consulting the server.
 7. At any point above, if the server closes the gRPC stream with an error,
    then Envoy 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.
 
  • Method Summary

    Modifier and Type
    Method
    Description
    default io.grpc.stub.StreamObserver<ProcessingRequest>
    process(io.grpc.stub.StreamObserver<ProcessingResponse> responseObserver)
    This begins the bidirectional stream that Envoy will use to give the server control over what the filter does.
  • Method Details

    • process

      default io.grpc.stub.StreamObserver<ProcessingRequest> process(io.grpc.stub.StreamObserver<ProcessingResponse> responseObserver)
       This begins the bidirectional stream that Envoy will use to
       give the server control over what the filter does. The actual
       protocol is described by the ProcessingRequest and ProcessingResponse
       messages below.