Ubuntu Pastebin

Paste from dimitern at Thu, 29 Oct 2015 09:57:31 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Observer can be implemented by a provider to get notified about container
// events, and have a chance to modify how containers are created and
// configured, as well as perform any necessary cleanup before container
// destruction.
type Observer interface {
	// OnContainerInit is called once per container type, during
	// Initialiser.Initialise().
	OnContainerInit(containerType instance.ContainerType, series string)

	// OnContainerCreate is called during Manager.CreateContainer() and takes
	// the same arguments. The method can modify any of the given
	// configurations, if needed.
	OnContainerCreate(
		instanceConfig *instancecfg.InstanceConfig,
		series string,
		networkConfig *NetworkConfig,
		storageConfig *StorageConfig,
	)

	// OnContainerDestroy is called during Manager.DestroyContainer() and takes
	// the same arguments.
	OnContainerDestroy(instance.Id)
}
Download as text