Documentation ¶
Index ¶
- type ClusterBuilder
- type ClusterBuilderConfig
- type ClusterBuilderOpt
- func CircuitBreaker(circuitBreaker *core_mesh.CircuitBreakerResource) ClusterBuilderOpt
- func ClientSideMTLS(mesh *core_mesh.MeshResource, upstreamService string, upstreamTLSReady bool, ...) ClusterBuilderOpt
- func ClientSideTLS(endpoints []core_xds.Endpoint) ClusterBuilderOpt
- func DefaultTimeout() ClusterBuilderOpt
- func EdsCluster(name string) ClusterBuilderOpt
- func HealthCheck(protocol core_mesh.Protocol, healthCheck *core_mesh.HealthCheckResource) ClusterBuilderOpt
- func Http() ClusterBuilderOpt
- func Http2() ClusterBuilderOpt
- func LB(lb *mesh_proto.TrafficRoute_LoadBalancer) ClusterBuilderOpt
- func OutlierDetection(circuitBreaker *core_mesh.CircuitBreakerResource) ClusterBuilderOpt
- func PassThroughCluster(name string) ClusterBuilderOpt
- func ProvidedEndpointCluster(name string, hasIPv6 bool, endpoints ...core_xds.Endpoint) ClusterBuilderOpt
- func Timeout(protocol core_mesh.Protocol, timeout *core_mesh.TimeoutResource) ClusterBuilderOpt
- func UnknownDestinationClientSideMTLS(mesh *core_mesh.MeshResource) 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 envoy.APIVersion) *ClusterBuilder
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.
type ClusterBuilderConfig ¶
type ClusterBuilderConfig struct { // A series of ClusterConfigurers to apply to Envoy cluster. ConfigurersV3 []v3.ClusterConfigurer }
ClusterBuilderConfig holds configuration of a ClusterBuilder.
func (*ClusterBuilderConfig) AddV3 ¶
func (c *ClusterBuilderConfig) AddV3(configurer v3.ClusterConfigurer)
Add appends a given ClusterConfigurer to the end of the chain.
type ClusterBuilderOpt ¶
type ClusterBuilderOpt interface { // ApplyTo adds ClusterConfigurer(s) to the ClusterBuilder. ApplyTo(config *ClusterBuilderConfig) }
ClusterBuilderOpt is a configuration option for ClusterBuilder.
The goal of ClusterBuilderOpt is to facilitate fluent ClusterBuilder API.
func CircuitBreaker ¶
func CircuitBreaker(circuitBreaker *core_mesh.CircuitBreakerResource) ClusterBuilderOpt
func ClientSideMTLS ¶
func ClientSideMTLS(mesh *core_mesh.MeshResource, upstreamService string, upstreamTLSReady bool, tags []envoy.Tags) ClusterBuilderOpt
func ClientSideTLS ¶
func ClientSideTLS(endpoints []core_xds.Endpoint) ClusterBuilderOpt
func DefaultTimeout ¶
func DefaultTimeout() ClusterBuilderOpt
func EdsCluster ¶
func EdsCluster(name string) ClusterBuilderOpt
func HealthCheck ¶
func HealthCheck(protocol core_mesh.Protocol, healthCheck *core_mesh.HealthCheckResource) ClusterBuilderOpt
func Http ¶
func Http() ClusterBuilderOpt
func Http2 ¶
func Http2() ClusterBuilderOpt
func LB ¶
func LB(lb *mesh_proto.TrafficRoute_LoadBalancer) ClusterBuilderOpt
func OutlierDetection ¶
func OutlierDetection(circuitBreaker *core_mesh.CircuitBreakerResource) ClusterBuilderOpt
func PassThroughCluster ¶
func PassThroughCluster(name string) ClusterBuilderOpt
func ProvidedEndpointCluster ¶ added in v1.8.1
func ProvidedEndpointCluster(name string, 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 Timeout ¶
func Timeout(protocol core_mesh.Protocol, timeout *core_mesh.TimeoutResource) ClusterBuilderOpt
func UnknownDestinationClientSideMTLS ¶
func UnknownDestinationClientSideMTLS(mesh *core_mesh.MeshResource) ClusterBuilderOpt
UnknownDestinationClientSideMTLS configures cluster with mTLS for a mesh but without extensive destination verification (only Mesh is verified)
func UpstreamBindConfig ¶
func UpstreamBindConfig(address string, port uint32) ClusterBuilderOpt
type ClusterBuilderOptFunc ¶
type ClusterBuilderOptFunc func(config *ClusterBuilderConfig)
ClusterBuilderOptFunc is a convenience type adapter.
func LbSubset ¶
func LbSubset(tagSets envoy.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: kuma.io/service: backend - port: 1234 tags: kuma.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(config *ClusterBuilderConfig)