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 Discovery.DiscoveryRequest is processed. |
default void |
onStreamRequest(long streamId,
envoy.api.v2.Discovery.DiscoveryRequest request)
onStreamRequest is called for each Discovery.DiscoveryRequest that is received on the stream. |
default void |
onStreamResponse(long streamId,
envoy.api.v2.Discovery.DiscoveryRequest request,
envoy.api.v2.Discovery.DiscoveryResponse response)
onStreamResponse is called just before each Discovery.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 Discovery.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,
envoy.api.v2.Discovery.DiscoveryRequest request)
onStreamRequest is called for each Discovery.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 instancedefault void onStreamResponse(long streamId,
envoy.api.v2.Discovery.DiscoveryRequest request,
envoy.api.v2.Discovery.DiscoveryResponse response)
onStreamResponse is called just before each Discovery.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 The Envoy Project. All rights reserved.