synchronizer

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package synchronizer synchronizes configurations down to devices

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Factory

func Factory(topoChannel <-chan *topodevice.ListResponse, opStateChan chan<- events.OperationalStateEvent,
	southboundErrorChan chan<- events.DeviceResponse, dispatcher *dispatcher.Dispatcher,
	modelRegistry *modelregistry.ModelRegistry, operationalStateCache map[topodevice.ID]devicechange.TypedValueMap,
	newTargetFn func() southbound.TargetIf,
	operationalStateCacheLock *syncPrimitives.RWMutex, deviceChangeStore device.Store)

Factory is a go routine thread that listens out for Device creation and deletion events and spawns Synchronizer threads for them These connectionMonitors then listen out for configEvents relative to a device and

Types

type Synchronizer

type Synchronizer struct {
	context.Context
	*topodevice.Device
	// contains filtered or unexported fields
}

Synchronizer enables proper configuring of a device based on store events and cache of operational data

func New

func New(context context.Context,
	device *topodevice.Device, opStateChan chan<- events.OperationalStateEvent,
	errChan chan<- events.DeviceResponse, opStateCache devicechange.TypedValueMap,
	mReadOnlyPaths modelregistry.ReadOnlyPathMap, target southbound.TargetIf, getStateMode modelregistry.GetStateMode,
	opStateCacheLock *syncPrimitives.RWMutex, deviceChangeStore device.Store) (*Synchronizer, error)

New builds a new Synchronizer given the parameters, starts the connection with the device and polls the capabilities

Jump to

Keyboard shortcuts

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