Documentation ¶
Index ¶
- func GetResourceName(res envoy_types.Resource) string
- func IndexResourcesByName(items []envoy_types.ResourceWithTTL) map[string]envoy_types.ResourceWithTTL
- type ResourceBuilder
- type ResourceVersionMap
- type Snapshot
- func (s *Snapshot) ConstructVersionMap() error
- func (s *Snapshot) GetResources(typ string) map[string]envoy_types.Resource
- func (s *Snapshot) GetResourcesAndTTL(typ string) map[string]envoy_types.ResourceWithTTL
- func (s *Snapshot) GetVersion(typ string) string
- func (s *Snapshot) GetVersionMap(typeURL string) map[string]string
- type SnapshotBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetResourceName ¶
func GetResourceName(res envoy_types.Resource) string
func IndexResourcesByName ¶
func IndexResourcesByName(items []envoy_types.ResourceWithTTL) map[string]envoy_types.ResourceWithTTL
IndexResourcesByName creates a map from the resource name to the resource. Name should be unique across meshes that's why Name is <name>.<mesh>
Types ¶
type ResourceBuilder ¶
type ResourceBuilder interface{}
type ResourceVersionMap ¶
type ResourceVersionMap map[core_model.ResourceType]util.NameToVersion
type Snapshot ¶
type Snapshot struct { Resources map[core_model.ResourceType]envoy_cache.Resources // VersionMap holds the current hash map of all resources in the snapshot. // This field should remain nil until it is used, at which point should be // instantiated by calling ConstructVersionMap(). // VersionMap is only to be used with delta xDS. VersionMap ResourceVersionMap }
Snapshot is an internally consistent snapshot of xDS resources.
func (*Snapshot) ConstructVersionMap ¶
ConstructVersionMap will construct a version map based on the current state of a snapshot
func (*Snapshot) GetResources ¶
func (s *Snapshot) GetResources(typ string) map[string]envoy_types.Resource
func (*Snapshot) GetResourcesAndTTL ¶
func (s *Snapshot) GetResourcesAndTTL(typ string) map[string]envoy_types.ResourceWithTTL
func (*Snapshot) GetVersion ¶
type SnapshotBuilder ¶
type SnapshotBuilder interface { With(typ core_model.ResourceType, resources []envoy_types.Resource) SnapshotBuilder Build(version string) envoy_cache.ResourceSnapshot }
func NewSnapshotBuilder ¶
func NewSnapshotBuilder() SnapshotBuilder
Click to show internal directories.
Click to hide internal directories.