Documentation ¶
Overview ¶
Package synchronizer synchronizes configurations down to devices
Index ¶
- func WithDeviceChangeStore(deviceChangeStore device.Store) func(*SessionManager)
- func WithDeviceStore(deviceStore devicestore.Store) func(*SessionManager)
- func WithDispatcher(dispatcher *dispatcher.Dispatcher) func(*SessionManager)
- func WithMastershipStore(mastershipStore mastership.Store) func(*SessionManager)
- func WithModelRegistry(modelRegistry *modelregistry.ModelRegistry) func(*SessionManager)
- func WithNewTargetFn(newTargetFn func() southbound.TargetIf) func(*SessionManager)
- func WithOpStateChannel(opStateChan chan<- events.OperationalStateEvent) func(*SessionManager)
- func WithOperationalStateCache(operationalStateCache map[topodevice.ID]devicechange.TypedValueMap) func(*SessionManager)
- func WithOperationalStateCacheLock(operationalStateCacheLock *sync.RWMutex) func(*SessionManager)
- func WithSessions(sessions map[topodevice.ID]*Session) func(*SessionManager)
- func WithTopoChannel(topoChannel chan *topodevice.ListResponse) func(*SessionManager)
- type Session
- type SessionManager
- type Synchronizer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithDeviceChangeStore ¶ added in v0.6.12
func WithDeviceChangeStore(deviceChangeStore device.Store) func(*SessionManager)
WithDeviceChangeStore sets device change store
func WithDeviceStore ¶ added in v0.6.15
func WithDeviceStore(deviceStore devicestore.Store) func(*SessionManager)
WithDeviceStore sets device store
func WithDispatcher ¶ added in v0.6.12
func WithDispatcher(dispatcher *dispatcher.Dispatcher) func(*SessionManager)
WithDispatcher sets dispatcher
func WithMastershipStore ¶ added in v0.6.15
func WithMastershipStore(mastershipStore mastership.Store) func(*SessionManager)
WithMastershipStore sets mastership store
func WithModelRegistry ¶ added in v0.6.12
func WithModelRegistry(modelRegistry *modelregistry.ModelRegistry) func(*SessionManager)
WithModelRegistry sets model registry
func WithNewTargetFn ¶ added in v0.6.12
func WithNewTargetFn(newTargetFn func() southbound.TargetIf) func(*SessionManager)
WithNewTargetFn sets southbound target function
func WithOpStateChannel ¶ added in v0.6.12
func WithOpStateChannel(opStateChan chan<- events.OperationalStateEvent) func(*SessionManager)
WithOpStateChannel sets opStateChannel
func WithOperationalStateCache ¶ added in v0.6.12
func WithOperationalStateCache(operationalStateCache map[topodevice.ID]devicechange.TypedValueMap) func(*SessionManager)
WithOperationalStateCache sets operational state cache
func WithOperationalStateCacheLock ¶ added in v0.6.12
func WithOperationalStateCacheLock(operationalStateCacheLock *sync.RWMutex) func(*SessionManager)
WithOperationalStateCacheLock sets operational state cache lock
func WithSessions ¶ added in v0.6.15
func WithSessions(sessions map[topodevice.ID]*Session) func(*SessionManager)
WithSessions sets list of sessions
func WithTopoChannel ¶ added in v0.6.12
func WithTopoChannel(topoChannel chan *topodevice.ListResponse) func(*SessionManager)
WithTopoChannel sets topo channel
Types ¶
type Session ¶ added in v0.6.15
type Session struct {
// contains filtered or unexported fields
}
Session a gNMI session
type SessionManager ¶ added in v0.6.15
type SessionManager struct {
// contains filtered or unexported fields
}
SessionManager is a gNMI session manager
func NewSessionManager ¶ added in v0.6.15
func NewSessionManager(options ...func(*SessionManager)) (*SessionManager, error)
NewSessionManager create a new session manager
func (*SessionManager) Start ¶ added in v0.6.15
func (sm *SessionManager) Start() error
Start starts session manager
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 configmodel.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