Documentation
¶
Index ¶
- Constants
- func DestinationEndpointServedVerifierFactory(name string, _ *json.Decoder, _ fwkplugin.Handle) (fwkplugin.Plugin, error)
- type DestinationEndpointServedVerifier
- func (desv *DestinationEndpointServedVerifier) ResponseHeader(ctx context.Context, request *fwksched.InferenceRequest, ...)
- func (desv *DestinationEndpointServedVerifier) TypedName() fwkplugin.TypedName
- func (desv *DestinationEndpointServedVerifier) WithName(name string) *DestinationEndpointServedVerifier
Constants ¶
const (
// DestinationEndpointServedVerifierType is the ResponseReceived type that is used in plugins registry.
DestinationEndpointServedVerifierType = "destination-endpoint-served-verifier"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DestinationEndpointServedVerifier ¶
type DestinationEndpointServedVerifier struct {
// contains filtered or unexported fields
}
DestinationEndpointServedVerifier is a test-only plugin for conformance tests. It verifies that the request was served by the expected endpoint. It works by reading Envoy's dynamic metadata, which is passed in the Response.ReqMetadata field. This metadata should contain the address of the backend endpoint that served the request. The verifier then writes this address to the "x-conformance-test-served-endpoint" response header. The conformance test client can then validate this header to ensure the request was routed correctly.
func NewDestinationEndpointServedVerifier ¶
func NewDestinationEndpointServedVerifier() *DestinationEndpointServedVerifier
func (*DestinationEndpointServedVerifier) ResponseHeader ¶
func (desv *DestinationEndpointServedVerifier) ResponseHeader(ctx context.Context, request *fwksched.InferenceRequest, response *requestcontrol.Response, _ *fwkdl.EndpointMetadata)
ResponseHeader is the handler for the ResponseHeader extension point.
func (*DestinationEndpointServedVerifier) TypedName ¶
func (desv *DestinationEndpointServedVerifier) TypedName() fwkplugin.TypedName
TypedName returns the type and name tuple of this plugin instance.
func (*DestinationEndpointServedVerifier) WithName ¶
func (desv *DestinationEndpointServedVerifier) WithName(name string) *DestinationEndpointServedVerifier
WithName sets the name of the filter.