Documentation
¶
Index ¶
- type CLACache
- type CaSecret
- type CircuitBreakerMap
- type DataplaneMetadata
- func (m *DataplaneMetadata) GetAdminPort() uint32
- func (m *DataplaneMetadata) GetDNSPort() uint32
- func (m *DataplaneMetadata) GetDataplaneResource() *core_mesh.DataplaneResource
- func (m *DataplaneMetadata) GetDataplaneToken() string
- func (m *DataplaneMetadata) GetDataplaneTokenPath() string
- func (m *DataplaneMetadata) GetDynamicMetadata(key string) string
- func (m *DataplaneMetadata) GetEmptyDNSPort() uint32
- func (m *DataplaneMetadata) GetProxyType() mesh_proto.ProxyType
- func (m *DataplaneMetadata) GetVersion() *mesh_proto.Version
- func (m *DataplaneMetadata) GetZoneIngressResource() *core_mesh.ZoneIngressResource
- type DestinationMap
- type Endpoint
- type EndpointList
- type EndpointMap
- type ExternalService
- type FaultInjectionMap
- type HealthCheckMap
- type IdentitySecret
- type Locality
- type LogMap
- type MatchedPolicies
- type Proxy
- type ProxyId
- type RateLimitsMap
- type Resource
- type ResourceList
- func (rs ResourceList) Len() int
- func (rs ResourceList) Less(i, j int) bool
- func (rs ResourceList) Payloads() []ResourcePayload
- func (rs ResourceList) Swap(i, j int)
- func (rs ResourceList) ToDeltaDiscoveryResponse() (*envoy.DeltaDiscoveryResponse, error)
- func (rs ResourceList) ToIndex() map[string]ResourcePayload
- type ResourcePayload
- type ResourceSet
- func (s *ResourceSet) Add(resources ...*Resource) *ResourceSet
- func (s *ResourceSet) AddSet(set *ResourceSet) *ResourceSet
- func (s *ResourceSet) Contains(name string, resource ResourcePayload) bool
- func (s *ResourceSet) Empty() bool
- func (s *ResourceSet) List() ResourceList
- func (s *ResourceSet) ListOf(typ string) ResourceList
- func (s *ResourceSet) Remove(typ string, name string)
- func (s *ResourceSet) Resources(typ string) map[string]*Resource
- type RetryMap
- type RouteMap
- type Routing
- type ServiceName
- type SocketAddressProtocol
- type StreamID
- type TagSelectorSet
- type TimeoutMap
- type TrafficPermissionMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CLACache ¶
type CLACache interface {
GetCLA(ctx context.Context, meshName, meshHash string, cluster envoy_common.Cluster, apiVersion envoy_common.APIVersion) (proto.Message, error)
}
type CircuitBreakerMap ¶
type CircuitBreakerMap map[ServiceName]*mesh_core.CircuitBreakerResource
CircuitBreakerMap holds the most specific CircuitBreaker for each reachable service.
type DataplaneMetadata ¶
type DataplaneMetadata struct {
DataplaneTokenPath string
DataplaneToken string
DataplaneResource *core_mesh.DataplaneResource
ZoneIngressResource *core_mesh.ZoneIngressResource
AdminPort uint32
DNSPort uint32
EmptyDNSPort uint32
DynamicMetadata map[string]string
ProxyType mesh_proto.ProxyType
Version *mesh_proto.Version
}
DataplaneMetadata represents environment-specific part of a dataplane configuration.
This information might change from one dataplane run to another and therefore it cannot be a part of Dataplane resource.
On start-up, a dataplane captures its effective configuration (that might come from a file, environment variables and command line options) and includes it into request for a bootstrap config. Control Plane can use this information to fill in node metadata in the bootstrap config. Envoy will include node metadata from the bootstrap config at least into the very first discovery request on every xDS stream. This way, xDS server will be able to use Envoy node metadata to generate xDS resources that depend on environment-specific configuration.
func DataplaneMetadataFromXdsMetadata ¶
func DataplaneMetadataFromXdsMetadata(xdsMetadata *_struct.Struct) *DataplaneMetadata
func (*DataplaneMetadata) GetAdminPort ¶
func (m *DataplaneMetadata) GetAdminPort() uint32
func (*DataplaneMetadata) GetDNSPort ¶
func (m *DataplaneMetadata) GetDNSPort() uint32
func (*DataplaneMetadata) GetDataplaneResource ¶
func (m *DataplaneMetadata) GetDataplaneResource() *core_mesh.DataplaneResource
func (*DataplaneMetadata) GetDataplaneToken ¶
func (m *DataplaneMetadata) GetDataplaneToken() string
func (*DataplaneMetadata) GetDataplaneTokenPath ¶
func (m *DataplaneMetadata) GetDataplaneTokenPath() string
func (*DataplaneMetadata) GetDynamicMetadata ¶
func (m *DataplaneMetadata) GetDynamicMetadata(key string) string
func (*DataplaneMetadata) GetEmptyDNSPort ¶
func (m *DataplaneMetadata) GetEmptyDNSPort() uint32
func (*DataplaneMetadata) GetProxyType ¶
func (m *DataplaneMetadata) GetProxyType() mesh_proto.ProxyType
func (*DataplaneMetadata) GetVersion ¶
func (m *DataplaneMetadata) GetVersion() *mesh_proto.Version
func (*DataplaneMetadata) GetZoneIngressResource ¶
func (m *DataplaneMetadata) GetZoneIngressResource() *core_mesh.ZoneIngressResource
type DestinationMap ¶
type DestinationMap map[ServiceName]TagSelectorSet
DestinationMap holds a set of selectors for all reachable Dataplanes grouped by service name. DestinationMap is based on ServiceName and not on the OutboundInterface because TrafficRoute can introduce new service destinations that were not included in a outbound section. Policies that match on outbound connections also match by service destination name and not outbound interface for the same reason.
type Endpoint ¶
type Endpoint struct {
Target string
Port uint32
Tags map[string]string
Weight uint32
Locality *Locality
ExternalService *ExternalService
}
Endpoint holds routing-related information about a single endpoint.
func (Endpoint) ContainsTags ¶
func (e Endpoint) ContainsTags(tags map[string]string) bool
ContainsTags returns 'true' if for every key presented both in 'tags' and 'Endpoint#Tags' values are equal
func (Endpoint) HasLocality ¶
func (e Endpoint) HasLocality() bool
func (Endpoint) IsExternalService ¶
func (e Endpoint) IsExternalService() bool
func (Endpoint) LocalityString ¶
func (e Endpoint) LocalityString() string
type EndpointList ¶
type EndpointList []Endpoint
EndpointList is a list of Endpoints with convenience methods.
type EndpointMap ¶
type EndpointMap map[ServiceName][]Endpoint
EndpointMap holds routing-related information about a set of endpoints grouped by service name.
type ExternalService ¶
type ExternalService struct {
TLSEnabled bool
CaCert []byte
ClientCert []byte
ClientKey []byte
AllowRenegotiation bool
}
type FaultInjectionMap ¶
type FaultInjectionMap map[mesh_proto.InboundInterface]*mesh_proto.FaultInjection
FaultInjectionMap holds the most specific FaultInjectionResource for each InboundInterface
type HealthCheckMap ¶
type HealthCheckMap map[ServiceName]*mesh_core.HealthCheckResource
HealthCheckMap holds the most specific HealthCheck for each reachable service.
type IdentitySecret ¶
type IdentitySecret struct {
PemCerts [][]byte
PemKey []byte
}
type LogMap ¶
type LogMap map[ServiceName]*mesh_proto.LoggingBackend
LogMap holds the most specific TrafficLog for each outbound interface of a Dataplane.
type MatchedPolicies ¶
type MatchedPolicies struct {
TrafficPermissions TrafficPermissionMap
Logs LogMap
HealthChecks HealthCheckMap
CircuitBreakers CircuitBreakerMap
Retries RetryMap
TrafficTrace *mesh_core.TrafficTraceResource
TracingBackend *mesh_proto.TracingBackend
FaultInjections FaultInjectionMap
Timeouts TimeoutMap
RateLimits RateLimitsMap
}
type Proxy ¶
type Proxy struct {
Id ProxyId
APIVersion envoy_common.APIVersion // todo(jakubdyszkiewicz) consider moving APIVersion here. pkg/core should not depend on pkg/xds. It should be other way around.
Dataplane *mesh_core.DataplaneResource
ZoneIngress *mesh_core.ZoneIngressResource
Metadata *DataplaneMetadata
Routing Routing
Policies MatchedPolicies
}
type ProxyId ¶
type ProxyId struct {
// contains filtered or unexported fields
}
func BuildProxyId ¶
func BuildProxyId(mesh, name string) *ProxyId
func FromResourceKey ¶
func FromResourceKey(key core_model.ResourceKey) ProxyId
func ParseProxyIdFromString ¶
func ParseProxyIdFromString(id string) (*ProxyId, error)
func (*ProxyId) ToResourceKey ¶
func (id *ProxyId) ToResourceKey() core_model.ResourceKey
type RateLimitsMap ¶
type RateLimitsMap map[mesh_proto.InboundInterface][]*mesh_proto.RateLimit
RateLimitsMap holds all RateLimitResources for each InboundInterface
type Resource ¶
type Resource struct {
Name string
Origin string
Resource ResourcePayload
}
Resource represents a generic xDS resource with name and version.
type ResourceList ¶
type ResourceList []*Resource
ResourceList represents a list of generic xDS resources.
func (ResourceList) ToDeltaDiscoveryResponse ¶
func (rs ResourceList) ToDeltaDiscoveryResponse() (*envoy.DeltaDiscoveryResponse, error)
type ResourcePayload ¶
type ResourcePayload = envoy_types.Resource
ResourcePayload is a convenience type alias.
type ResourceSet ¶
type ResourceSet struct {
// contains filtered or unexported fields
}
ResourceSet represents a set of generic xDS resources.
func NewResourceSet ¶
func NewResourceSet() *ResourceSet
type RetryMap ¶
type RetryMap map[ServiceName]*mesh_core.RetryResource
RetryMap holds the most specific Retry for each reachable service.
type RouteMap ¶
type RouteMap map[mesh_proto.OutboundInterface]*mesh_core.TrafficRouteResource
RouteMap holds the most specific TrafficRoute for each outbound interface of a Dataplane.
type Routing ¶
type Routing struct {
TrafficRoutes RouteMap
OutboundTargets EndpointMap
// todo(lobkovilya): split Proxy struct into DataplaneProxy and IngressProxy
// TrafficRouteList is used only for generating configs for Ingress.
TrafficRouteList *mesh_core.TrafficRouteResourceList
}
type ServiceName ¶
type ServiceName = string
ServiceName is a convenience type alias to clarify the meaning of string value.
type SocketAddressProtocol ¶
type SocketAddressProtocol int32
SocketAddressProtocol is the L4 protocol the listener should bind to
const (
SocketAddressProtocolTCP SocketAddressProtocol = 0
SocketAddressProtocolUDP SocketAddressProtocol = 1
)
type TagSelectorSet ¶
type TagSelectorSet []mesh_proto.TagSelector
TagSelectorSet is a set of unique TagSelectors.
type TimeoutMap ¶
type TimeoutMap map[mesh_proto.OutboundInterface]*mesh_core.TimeoutResource
TimeoutMap holds the most specific TimeoutResource for each OutboundInterface
type TrafficPermissionMap ¶
type TrafficPermissionMap map[mesh_proto.InboundInterface]*mesh_core.TrafficPermissionResource
TrafficPermissionMap holds the most specific TrafficPermissionResource for each InboundInterface