Documentation ¶
Index ¶
- type ClusterBuilder
- type ClusterBuilderOpt
- func ConnectionBufferLimit(bytes uint32) ClusterBuilderOpt
- func EdsCluster() ClusterBuilderOpt
- func Http() ClusterBuilderOpt
- func Http2() ClusterBuilderOpt
- func Http2FromEdge() ClusterBuilderOpt
- func PassThroughCluster() ClusterBuilderOpt
- func ProvidedEndpointCluster(hasIPv6 bool, endpoints ...core_xds.Endpoint) ClusterBuilderOpt
- func UpstreamBindConfig(address string, port uint32) ClusterBuilderOpt
- type ClusterBuilderOptFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterBuilder ¶
type ClusterBuilder struct {
// contains filtered or unexported fields
}
ClusterBuilder is responsible for generating an Envoy cluster by applying a series of ClusterConfigurers.
func NewClusterBuilder ¶
func NewClusterBuilder(apiVersion core_xds.APIVersion, name string) *ClusterBuilder
func (*ClusterBuilder) AddConfigurer ¶
func (b *ClusterBuilder) AddConfigurer(configurer v3.ClusterConfigurer)
AddConfigurer appends a given ClusterConfigurer to the end of the chain.
func (*ClusterBuilder) Build ¶
func (b *ClusterBuilder) Build() (envoy.NamedResource, error)
Build generates an Envoy cluster by applying a series of ClusterConfigurers.
func (*ClusterBuilder) Configure ¶
func (b *ClusterBuilder) Configure(opts ...ClusterBuilderOpt) *ClusterBuilder
Configure configures ClusterBuilder by adding individual ClusterConfigurers.
func (*ClusterBuilder) MustBuild ¶
func (b *ClusterBuilder) MustBuild() envoy.NamedResource
type ClusterBuilderOpt ¶
type ClusterBuilderOpt interface { // ApplyTo adds ClusterConfigurer(s) to the ClusterBuilder. ApplyTo(builder *ClusterBuilder) }
ClusterBuilderOpt is a configuration option for ClusterBuilder.
The goal of ClusterBuilderOpt is to facilitate fluent ClusterBuilder API.
func ConnectionBufferLimit ¶
func ConnectionBufferLimit(bytes uint32) ClusterBuilderOpt
func EdsCluster ¶
func EdsCluster() ClusterBuilderOpt
func Http ¶
func Http() ClusterBuilderOpt
func Http2 ¶
func Http2() ClusterBuilderOpt
func Http2FromEdge ¶
func Http2FromEdge() ClusterBuilderOpt
func PassThroughCluster ¶
func PassThroughCluster() ClusterBuilderOpt
func ProvidedEndpointCluster ¶
func ProvidedEndpointCluster(hasIPv6 bool, endpoints ...core_xds.Endpoint) ClusterBuilderOpt
ProvidedEndpointCluster sets the cluster with the defined endpoints, this is useful when endpoints are not discovered using EDS, so we don't use EdsCluster
func UpstreamBindConfig ¶
func UpstreamBindConfig(address string, port uint32) ClusterBuilderOpt
type ClusterBuilderOptFunc ¶
type ClusterBuilderOptFunc func(config *ClusterBuilder)
ClusterBuilderOptFunc is a convenience type adapter.
func LbSubset ¶
func LbSubset(tagSets envoy_tags.TagKeysSlice) ClusterBuilderOptFunc
LbSubset is required for MetadataMatch in Weighted Cluster in TCP Proxy to work. Subset loadbalancing is used in two use cases
- TrafficRoute for splitting traffic. Example: TrafficRoute that splits 10% of the traffic to version 1 of the service backend and 90% traffic to version 2 of the service backend
- Multiple outbound sections with the same service Example: type: Dataplane networking: outbound: - port: 1234 tags: dubbo.io/service: backend - port: 1234 tags: dubbo.io/service: backend version: v1 Only one cluster "backend" is generated for such dataplane, but with lb subset by version.
func (ClusterBuilderOptFunc) ApplyTo ¶
func (f ClusterBuilderOptFunc) ApplyTo(builder *ClusterBuilder)