Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewController ¶
func NewController(mastership mastershipstore.Store, devices devicestore.Store, changes changestore.Store) *controller.Controller
NewController returns a new network controller
Types ¶
type ChangeWatcher ¶ added in v0.9.4
type ChangeWatcher struct { DeviceStore devicestore.Store ChangeStore devicechangestore.Store // contains filtered or unexported fields }
ChangeWatcher is a device change watcher
func (*ChangeWatcher) Start ¶ added in v0.9.4
func (w *ChangeWatcher) Start(ch chan<- controller.ID) error
Start starts the device change watcher
func (*ChangeWatcher) Stop ¶ added in v0.9.4
func (w *ChangeWatcher) Stop()
Stop stops the device change watcher
type Partitioner ¶
type Partitioner struct { }
Partitioner is a WorkPartitioner for devices
func (*Partitioner) Partition ¶
func (p *Partitioner) Partition(id controller.ID) (controller.PartitionKey, error)
Partition returns the device as a partition key
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
Reconciler is a device change reconciler
func (*Reconciler) Reconcile ¶
func (r *Reconciler) Reconcile(id controller.ID) (controller.Result, error)
Reconcile reconciles the state of a device change
type Resolver ¶
type Resolver struct{}
Resolver is a DeviceResolver that resolves device IDs from device change IDs
func (*Resolver) Resolve ¶
func (r *Resolver) Resolve(id controller.ID) (topodevice.ID, error)
Resolve resolves a device ID from a device change ID
type Watcher ¶
type Watcher struct { DeviceStore devicestore.Store ChangeStore devicechangestore.Store // contains filtered or unexported fields }
Watcher is a device watcher
Click to show internal directories.
Click to hide internal directories.