This section is empty.


This section is empty.


This section is empty.


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.
        	ConfigurersV2 []v2.ClusterConfigurer
        	ConfigurersV3 []v3.ClusterConfigurer

          ClusterBuilderConfig holds configuration of a ClusterBuilder.

          func (*ClusterBuilderConfig) AddV2

          func (c *ClusterBuilderConfig) AddV2(configurer v2.ClusterConfigurer)

            Add appends a given ClusterConfigurer to the end of the chain.

            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 ClientSideMTLS

                func ClientSideMTLS(ctx xds_context.Context, metadata *core_xds.DataplaneMetadata, clientService string, tags []envoy.Tags) ClusterBuilderOpt

                func ClientSideTLS

                func ClientSideTLS(endpoints []core_xds.Endpoint) ClusterBuilderOpt

                func DNSCluster

                func DNSCluster(name string, address string, port uint32) ClusterBuilderOpt

                func EdsCluster

                func EdsCluster(name string) ClusterBuilderOpt

                func HealthCheck

                func HealthCheck(healthCheck *mesh_core.HealthCheckResource) ClusterBuilderOpt

                func Http2

                func Http2() ClusterBuilderOpt

                func OutlierDetection

                func OutlierDetection(circuitBreaker *mesh_core.CircuitBreakerResource) ClusterBuilderOpt

                func PassThroughCluster

                func PassThroughCluster(name string) ClusterBuilderOpt

                func StaticCluster

                func StaticCluster(name string, address string, port uint32) ClusterBuilderOpt

                func StrictDNSCluster

                func StrictDNSCluster(name string, endpoints []core_xds.Endpoint) ClusterBuilderOpt

                func UnknownDestinationClientSideMTLS

                func UnknownDestinationClientSideMTLS(ctx xds_context.Context, metadata *core_xds.DataplaneMetadata) 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(keySets [][]string) ClusterBuilderOptFunc

                      LbSubset is required for MetadataMatch in Weighted Cluster in TCP Proxy to work. Subset loadbalancing is used in two use cases 1) 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 2) Multiple outbound sections with the same service

                      type: Dataplane
                        - port: 1234
                        - port: 1234
                            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)


                      Path Synopsis