istio: Index | Files

package monitor

import ""


Package Files

file_snapshot.go monitor.go

type FileSnapshot Uses

type FileSnapshot struct {
    // contains filtered or unexported fields

FileSnapshot holds a reference to a file directory that contains crd config and filter criteria for which of those configs will be parsed.

func NewFileSnapshot Uses

func NewFileSnapshot(root string, schemas collection.Schemas, domainSuffix string) *FileSnapshot

NewFileSnapshot returns a snapshotter. If no types are provided in the descriptor, all Istio types will be allowed.

func (*FileSnapshot) ReadConfigFiles Uses

func (f *FileSnapshot) ReadConfigFiles() ([]*config.Config, error)

ReadConfigFiles parses files in the root directory and returns a sorted slice of eligible model.Config. This can be used as a configFunc when creating a Monitor.

type Monitor Uses

type Monitor struct {
    // contains filtered or unexported fields

Monitor will poll a config function in order to update a ConfigStore as changes are found.

func NewMonitor Uses

func NewMonitor(name string, delegateStore model.ConfigStore, getSnapshotFunc func() ([]*config.Config, error), root string) *Monitor

NewMonitor creates a Monitor and will delegate to a passed in controller. The controller holds a reference to the actual store. Any func that returns a []*model.Config can be used with the Monitor

func (*Monitor) Start Uses

func (m *Monitor) Start(stop <-chan struct{})

Start starts a new Monitor. Immediately checks the Monitor getSnapshotFunc and updates the controller. It then kicks off an asynchronous event loop that periodically polls the getSnapshotFunc for changes until a close event is sent.

Package monitor imports 14 packages (graph) and is imported by 2 packages. Updated 2020-12-19. Refresh now. Tools for package owners.