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
Click to show internal directories.
Click to hide internal directories.