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

      type ResourceCache interface {
      	dag.Observer
      	xds.Resource
      }

        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

            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

                type Snapshotter interface {
                	Generate(version string, resources map[envoy_types.ResponseType][]envoy_types.Resource) error
                }

                Directories

                Path Synopsis