java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
io.envoyproxy.envoy.extensions.load_balancing_policies.override_host.v3.OverrideHost
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, OverrideHostOrBuilder, Serializable

public final class OverrideHost extends com.google.protobuf.GeneratedMessageV3 implements OverrideHostOrBuilder
 Configuration for the Override Host Load Balancing policy.

 This policy allows endpoint picking to be implemented in downstream HTTP filters. For example an ext_proc RPC to a service
 that implements k8s proposal for AI gateway inferences extensions
 https://github.com/kubernetes-sigs/gateway-api-inference-extension/tree/main/docs/proposals/004-endpoint-picker-protocol
 can provide hosts for serving a request using Override Host load balancing policy.

 This policy extracts selected override hosts from a list of ``OverrideHostSource`` (request headers, metadata, etc.).

 The override host source must specify at least one host in ``IP:Port`` format or multiple hosts in ``IP:Port,IP:Port,...``
 format. For example ``10.0.0.5:8080`` or ``[2600:4040:5204::1574:24ae]:80``. The IPv6 address is enclosed in square brackets.

 For specific example, to support k8s gateway inference extensions, which uses the ``x-gateway-destination-endpoint``
 header or metadata value under the "envoy.lb" key for selected hosts, the Override Host load balancing policy should be
 configured in the following way:

 .. code-block:: yaml

    override_host_sources:
      - header: "x-gateway-destination-endpoint"
      - metadata:
          key: "envoy.lb"
          path:
          - key: "x-gateway-destination-endpoint"

 If no valid host in the override host list, then the specified fallback load balancing policy is used. This allows load
 balancing to degrade to a a built in policy (i.e. Round Robin) in case external endpoint picker fails.

 See the :ref:`load balancing architecture
 overview<arch_overview_load_balancing_types>` for more information.
 
Protobuf type envoy.extensions.load_balancing_policies.override_host.v3.OverrideHost
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    Configuration for the Override Host Load Balancing policy.
    static final class 
    Protobuf type envoy.extensions.load_balancing_policies.override_host.v3.OverrideHost.OverrideHostSource
    static interface 
     

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3

    com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessageV3

    alwaysUseFieldBuilders, unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessage

    memoizedSize

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
     
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    The child LB policy to use in case neither header nor metadata with selected hosts is present.
    The child LB policy to use in case neither header nor metadata with selected hosts is present.
    A list of sources to get host addresses from.
    int
    A list of sources to get host addresses from.
    A list of sources to get host addresses from.
    A list of sources to get host addresses from.
    A list of sources to get host addresses from.
    com.google.protobuf.Parser<OverrideHost>
     
    int
     
    boolean
    The child LB policy to use in case neither header nor metadata with selected hosts is present.
    int
     
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
     
    final boolean
     
     
     
     
    newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
     
    protected Object
    newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
     
     
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(byte[] data)
     
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.ByteString data)
     
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<OverrideHost>
     
     
    void
    writeTo(com.google.protobuf.CodedOutputStream output)
     

    Methods inherited from class com.google.protobuf.GeneratedMessageV3

    canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag

    Methods inherited from class com.google.protobuf.AbstractMessage

    findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLite

    toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Field Details

    • OVERRIDE_HOST_SOURCES_FIELD_NUMBER

      public static final int OVERRIDE_HOST_SOURCES_FIELD_NUMBER
      See Also:
    • FALLBACK_POLICY_FIELD_NUMBER

      public static final int FALLBACK_POLICY_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • getOverrideHostSourcesList

      public List<OverrideHost.OverrideHostSource> getOverrideHostSourcesList()
       A list of sources to get host addresses from. The host sources are searched in the order
       specified. The request is forwarded to the first address and subsequent addresses are used
       for request retries or hedging.
       Note that if an overridden host address is not present in the current endpoint set, it is
       skipped and the next found address is used. If there are not enough overridden addresses to
       satisfy all retry attempts the fallback load balancing policy is used to pick a host.
       
      repeated .envoy.extensions.load_balancing_policies.override_host.v3.OverrideHost.OverrideHostSource override_host_sources = 1 [(.validate.rules) = { ... }
      Specified by:
      getOverrideHostSourcesList in interface OverrideHostOrBuilder
    • getOverrideHostSourcesOrBuilderList

      public List<? extends OverrideHost.OverrideHostSourceOrBuilder> getOverrideHostSourcesOrBuilderList()
       A list of sources to get host addresses from. The host sources are searched in the order
       specified. The request is forwarded to the first address and subsequent addresses are used
       for request retries or hedging.
       Note that if an overridden host address is not present in the current endpoint set, it is
       skipped and the next found address is used. If there are not enough overridden addresses to
       satisfy all retry attempts the fallback load balancing policy is used to pick a host.
       
      repeated .envoy.extensions.load_balancing_policies.override_host.v3.OverrideHost.OverrideHostSource override_host_sources = 1 [(.validate.rules) = { ... }
      Specified by:
      getOverrideHostSourcesOrBuilderList in interface OverrideHostOrBuilder
    • getOverrideHostSourcesCount

      public int getOverrideHostSourcesCount()
       A list of sources to get host addresses from. The host sources are searched in the order
       specified. The request is forwarded to the first address and subsequent addresses are used
       for request retries or hedging.
       Note that if an overridden host address is not present in the current endpoint set, it is
       skipped and the next found address is used. If there are not enough overridden addresses to
       satisfy all retry attempts the fallback load balancing policy is used to pick a host.
       
      repeated .envoy.extensions.load_balancing_policies.override_host.v3.OverrideHost.OverrideHostSource override_host_sources = 1 [(.validate.rules) = { ... }
      Specified by:
      getOverrideHostSourcesCount in interface OverrideHostOrBuilder
    • getOverrideHostSources

      public OverrideHost.OverrideHostSource getOverrideHostSources(int index)
       A list of sources to get host addresses from. The host sources are searched in the order
       specified. The request is forwarded to the first address and subsequent addresses are used
       for request retries or hedging.
       Note that if an overridden host address is not present in the current endpoint set, it is
       skipped and the next found address is used. If there are not enough overridden addresses to
       satisfy all retry attempts the fallback load balancing policy is used to pick a host.
       
      repeated .envoy.extensions.load_balancing_policies.override_host.v3.OverrideHost.OverrideHostSource override_host_sources = 1 [(.validate.rules) = { ... }
      Specified by:
      getOverrideHostSources in interface OverrideHostOrBuilder
    • getOverrideHostSourcesOrBuilder

      public OverrideHost.OverrideHostSourceOrBuilder getOverrideHostSourcesOrBuilder(int index)
       A list of sources to get host addresses from. The host sources are searched in the order
       specified. The request is forwarded to the first address and subsequent addresses are used
       for request retries or hedging.
       Note that if an overridden host address is not present in the current endpoint set, it is
       skipped and the next found address is used. If there are not enough overridden addresses to
       satisfy all retry attempts the fallback load balancing policy is used to pick a host.
       
      repeated .envoy.extensions.load_balancing_policies.override_host.v3.OverrideHost.OverrideHostSource override_host_sources = 1 [(.validate.rules) = { ... }
      Specified by:
      getOverrideHostSourcesOrBuilder in interface OverrideHostOrBuilder
    • hasFallbackPolicy

      public boolean hasFallbackPolicy()
       The child LB policy to use in case neither header nor metadata with selected
       hosts is present.
       
      .envoy.config.cluster.v3.LoadBalancingPolicy fallback_policy = 3 [(.validate.rules) = { ... }
      Specified by:
      hasFallbackPolicy in interface OverrideHostOrBuilder
      Returns:
      Whether the fallbackPolicy field is set.
    • getFallbackPolicy

      public LoadBalancingPolicy getFallbackPolicy()
       The child LB policy to use in case neither header nor metadata with selected
       hosts is present.
       
      .envoy.config.cluster.v3.LoadBalancingPolicy fallback_policy = 3 [(.validate.rules) = { ... }
      Specified by:
      getFallbackPolicy in interface OverrideHostOrBuilder
      Returns:
      The fallbackPolicy.
    • getFallbackPolicyOrBuilder

      public LoadBalancingPolicyOrBuilder getFallbackPolicyOrBuilder()
       The child LB policy to use in case neither header nor metadata with selected
       hosts is present.
       
      .envoy.config.cluster.v3.LoadBalancingPolicy fallback_policy = 3 [(.validate.rules) = { ... }
      Specified by:
      getFallbackPolicyOrBuilder in interface OverrideHostOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static OverrideHost parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OverrideHost parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OverrideHost parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OverrideHost parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OverrideHost parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OverrideHost parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static OverrideHost parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static OverrideHost parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static OverrideHost parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static OverrideHost parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static OverrideHost parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static OverrideHost parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public OverrideHost.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static OverrideHost.Builder newBuilder()
    • newBuilder

      public static OverrideHost.Builder newBuilder(OverrideHost prototype)
    • toBuilder

      public OverrideHost.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected OverrideHost.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static OverrideHost getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<OverrideHost> parser()
    • getParserForType

      public com.google.protobuf.Parser<OverrideHost> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public OverrideHost getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder