Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ObserversOf ¶
func ObserversOf(in []ResourceCache) []dag.Observer
ObserversOf transliterates a slice of ResourceCache into a slice of dag.Observer.
func ResourcesOf ¶
func ResourcesOf(in []ResourceCache) []xds.Resource
ResourcesOf transliterates a slice of ResourceCache into a slice of xds.Resource.
Types ¶
type ResourceCache ¶
ResourceCache is a store of an xDS resource type. It is able to visit the dag.DAG to update the its resource collection, then serve those resources over xDS.
type SnapshotHandler ¶
type SnapshotHandler struct { logrus.FieldLogger // contains filtered or unexported fields }
SnapshotHandler implements the xDS snapshot cache by responding to the OnChange() event causing a new snapshot to be created.
func NewSnapshotHandler ¶
func NewSnapshotHandler(resources []ResourceCache, logger logrus.FieldLogger) *SnapshotHandler
NewSnapshotHandler returns an instance of SnapshotHandler.
func (*SnapshotHandler) AddSnapshotter ¶ added in v1.10.0
func (s *SnapshotHandler) AddSnapshotter(snap Snapshotter)
func (*SnapshotHandler) OnChange ¶
func (s *SnapshotHandler) OnChange(root *dag.DAG)
OnChange is called when the DAG is rebuilt and a new snapshot is needed.
func (*SnapshotHandler) Refresh ¶
func (s *SnapshotHandler) Refresh()
Refresh is called when the EndpointsTranslator updates values in its cache.
type Snapshotter ¶ added in v1.10.0
type Snapshotter interface {
Generate(version string, resources map[envoy_types.ResponseType][]envoy_types.Resource) error
}