Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerSyncWorker ¶
type ContainerSyncWorker struct {
Config *config.DevicedConfig
ConfigLock *sync.Mutex
WorkerLock *sync.Mutex
DockerClient *dc.Client
Reflection *reflection.DevicedReflection
EventsContext context.Context
EventsContextCancel context.CancelFunc
Running bool
EventsChannel <-chan dce.Message
ErrorsChannel <-chan error
WakeChannel chan bool
}
Container Sync Worker
This worker periodically compares the list of target containers, the list of running containers, and attempts to reconcile by deleting / creating.
It also checks the list of available images to see if a better version for a container is available.
If so it will delete the old container and make a new one with the new version.
The worker uses the Docker events API to wait for events.
Waking the worker can be done by sending
func (*ContainerSyncWorker) Quit ¶
func (cw *ContainerSyncWorker) Quit()
func (*ContainerSyncWorker) Run ¶
func (cw *ContainerSyncWorker) Run()
Click to show internal directories.
Click to hide internal directories.