endpoints

package
v0.0.0-...-1d35728 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Separator = []byte{'~'}
	Slash     = []byte{'/'}
)

Functions

func ExtractEnvoyEndpoints

func ExtractEnvoyEndpoints(locEps []*LocalityEndpoints) []*endpoint.LocalityLbEndpoints

Types

type EndpointBuilder

type EndpointBuilder struct {
	// contains filtered or unexported fields
}

func NewCDSEndpointBuilder

func NewCDSEndpointBuilder(
	proxy *model.Proxy, push *model.PushContext, clusterName string,
	dir model.TrafficDirection, subsetName string, hostname host.Name, port int,
	service *model.Service, dr *model.ConsolidatedDestRule,
) *EndpointBuilder

NewCDSEndpointBuilder allows setting some fields directly when we already have the Service and DestinationRule.

func NewEndpointBuilder

func NewEndpointBuilder(clusterName string, proxy *model.Proxy, push *model.PushContext) EndpointBuilder

func (*EndpointBuilder) BuildClusterLoadAssignment

func (b *EndpointBuilder) BuildClusterLoadAssignment(endpointIndex *model.EndpointIndex) *endpoint.ClusterLoadAssignment

BuildClusterLoadAssignment converts the shards for this EndpointBuilder's Service into a ClusterLoadAssignment. Used for EDS.

func (*EndpointBuilder) Cacheable

func (b *EndpointBuilder) Cacheable() bool

func (*EndpointBuilder) DependentConfigs

func (b *EndpointBuilder) DependentConfigs() []model.ConfigHash

func (*EndpointBuilder) DestinationRule

func (b *EndpointBuilder) DestinationRule() *v1alpha3.DestinationRule

func (*EndpointBuilder) EndpointsByNetworkFilter

func (b *EndpointBuilder) EndpointsByNetworkFilter(endpoints []*LocalityEndpoints) []*LocalityEndpoints

EndpointsByNetworkFilter is a network filter function to support Split Horizon EDS - filter the endpoints based on the network of the connected sidecar. The filter will filter out all endpoints which are not present within the sidecar network and add a gateway endpoint to remote networks that have endpoints (if gateway exists and its IP is an IP and not a dns name). Information for the mesh networks is provided as a MeshNetwork config map.

func (*EndpointBuilder) EndpointsWithMTLSFilter

func (b *EndpointBuilder) EndpointsWithMTLSFilter(endpoints []*LocalityEndpoints) []*LocalityEndpoints

EndpointsWithMTLSFilter removes all endpoints that do not handle mTLS. This is determined by looking at auto-mTLS, DestinationRule, and PeerAuthentication to determine if we would send mTLS to these endpoints. Note there is no guarantee these destinations *actually* handle mTLS; just that we are configured to send mTLS to them.

func (*EndpointBuilder) FromServiceEndpoints

func (b *EndpointBuilder) FromServiceEndpoints() []*endpoint.LocalityLbEndpoints

FromServiceEndpoints builds LocalityLbEndpoints from the PushContext's snapshotted ServiceIndex. Used for CDS (ClusterLoadAssignment constructed elsewhere).

func (*EndpointBuilder) IsDNSCluster

func (b *EndpointBuilder) IsDNSCluster() bool

func (*EndpointBuilder) Key

func (b *EndpointBuilder) Key() any

Key provides the eds cache key and should include any information that could change the way endpoints are generated.

func (*EndpointBuilder) ServiceFound

func (b *EndpointBuilder) ServiceFound() bool

func (*EndpointBuilder) Type

func (b *EndpointBuilder) Type() string

func (*EndpointBuilder) WithSubset

func (b *EndpointBuilder) WithSubset(subset string) *EndpointBuilder

func (*EndpointBuilder) WriteHash

func (b *EndpointBuilder) WriteHash(h hash.Hash)

type LocalityEndpoints

type LocalityEndpoints struct {
	// contains filtered or unexported fields
}

func (*LocalityEndpoints) AssertInvarianceInTest

func (e *LocalityEndpoints) AssertInvarianceInTest()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL