public interface DiscoveryServerCallbacks
DiscoveryServerCallbacks defines the callbacks that are exposed by the DiscoveryServer. The callbacks
give consumers the opportunity to add their own application-specific logs/metrics based| Modifier and Type | Method and Description |
|---|---|
default void |
onStreamClose(long streamId,
String typeUrl)
onStreamClose is called just before the bi-directional gRPC stream is closed successfully for an envoy
instance. |
default void |
onStreamCloseWithError(long streamId,
String typeUrl,
Throwable error)
onStreamCloseWithError is called just before the bi-directional gRPC stream is closed for an envoy instance
due to some error that has occurred. |
default void |
onStreamOpen(long streamId,
String typeUrl)
onStreamOpen is called when the bi-directional gRPC stream is opened for an envoy instance, before the
initial DiscoveryRequest is processed. |
default void |
onStreamRequest(long streamId,
io.envoyproxy.envoy.api.v2.DiscoveryRequest request)
onStreamRequest is called for each DiscoveryRequest that is received on the stream. |
default void |
onStreamResponse(long streamId,
io.envoyproxy.envoy.api.v2.DiscoveryRequest request,
io.envoyproxy.envoy.api.v2.DiscoveryResponse response)
onStreamResponse is called just before each DiscoveryResponse that is sent on the stream. |
default void onStreamClose(long streamId,
String typeUrl)
onStreamClose is called just before the bi-directional gRPC stream is closed successfully for an envoy
instance.streamId - an ID for this stream that is only unique to this discovery server instancetypeUrl - the resource type of the stream, or DiscoveryServer.ANY_TYPE_URL for ADSdefault void onStreamCloseWithError(long streamId,
String typeUrl,
Throwable error)
onStreamCloseWithError is called just before the bi-directional gRPC stream is closed for an envoy instance
due to some error that has occurred.streamId - an ID for this stream that is only unique to this discovery server instancetypeUrl - the resource type of the stream, or DiscoveryServer.ANY_TYPE_URL for ADSerror - the error that caused the stream to closedefault void onStreamOpen(long streamId,
String typeUrl)
onStreamOpen is called when the bi-directional gRPC stream is opened for an envoy instance, before the
initial DiscoveryRequest is processed.streamId - an ID for this stream that is only unique to this discovery server instancetypeUrl - the resource type of the stream, or DiscoveryServer.ANY_TYPE_URL for ADSdefault void onStreamRequest(long streamId,
io.envoyproxy.envoy.api.v2.DiscoveryRequest request)
onStreamRequest is called for each DiscoveryRequest that is received on the stream.streamId - an ID for this stream that is only unique to this discovery server instancerequest - the discovery request sent by the envoy instanceRequestException - optionally can throw RequestException with custom status. That status
will be returned to the client and the stream will be closed with error.default void onStreamResponse(long streamId,
io.envoyproxy.envoy.api.v2.DiscoveryRequest request,
io.envoyproxy.envoy.api.v2.DiscoveryResponse response)
onStreamResponse is called just before each DiscoveryResponse that is sent on the stream.streamId - an ID for this stream that is only unique to this discovery server instancerequest - the discovery request sent by the envoy instanceresponse - the discovery response sent by the discovery serverCopyright © 2018–2019 The Envoy Project. All rights reserved.