istio: istio.io/istio/pilot/pkg/config/monitor Index | Files

package monitor

import "istio.io/istio/pilot/pkg/config/monitor"

Index

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, descriptor schema.Set) *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() ([]*model.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, checkInterval time.Duration, getSnapshotFunc func() ([]*model.Config, error)) *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 13 packages (graph) and is imported by 2 packages. Updated 2019-10-03. Refresh now. Tools for package owners.