cache

package
v2.0.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2018 License: Apache-2.0 Imports: 18 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContivTelemetryCache

type ContivTelemetryCache struct {
	Deps

	Synced           bool
	VppCache         api.VppCache
	K8sCache         api.K8sCache
	Processor        api.ContivTelemetryProcessor
	Report           api.Report
	ControllerReport api.ContivTelemetryControllerReport
	Verbose          bool
	// contains filtered or unexported fields
}

ContivTelemetryCache is used for a in-memory storage of K8s State data The cache processes K8s State data updates and RESYNC events through Update() and Resync() APIs, respectively. The cache allows to get notified about changes via convenient callbacks.

func NewTelemetryCache added in v1.4.0

func NewTelemetryCache(p logging.PluginLogger, collectionInterval time.Duration, verbose bool) *ContivTelemetryCache

NewTelemetryCache returns a new instance of telemetry cache

func (*ContivTelemetryCache) ClearCache

func (ctc *ContivTelemetryCache) ClearCache()

ClearCache clears all Contiv Telemetry cache data except for the data discovered from etcd updates.

func (*ContivTelemetryCache) Init

func (ctc *ContivTelemetryCache) Init() error

Init initializes policy cache.

func (*ContivTelemetryCache) ReinitializeCache

func (ctc *ContivTelemetryCache) ReinitializeCache()

ReinitializeCache completely re-initializes the Contiv Telemetry cache, clearing all data, including discovered vpp and k8s nodes and discovered k8s pods.

func (*ContivTelemetryCache) Resync

func (ctc *ContivTelemetryCache) Resync(resyncEv datasync.ResyncEvent) error

Resync sends the resync event passed as an argument to the ctc telemetryCache thread, where it processed in the function below (resync)

func (*ContivTelemetryCache) Update

func (ctc *ContivTelemetryCache) Update(dataChngEv datasync.ChangeEvent) error

Update sends the update event passed as an argument to the ctc telemetryCache thread, where it is processed in the function below (update). )

type DcEventQueue added in v1.4.0

type DcEventQueue []interface{}

DcEventQueue defines the queue for data change events coming from Etcd.

type Deps

type Deps struct {
	Log logging.Logger
}

Deps lists dependencies of PolicyCache.

type NodeDTO

type NodeDTO struct {
	NodeName string
	URL      string
	NodeInfo interface{}
	// contains filtered or unexported fields
}

NodeDTO is the Data Transfer Object (DTO) for sending data received from Contiv node Agent to the cache thread.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL