Documentation
¶
Overview ¶
Package cont provides tools to manage service containers started by Database Lab Engine.
Index ¶
- Constants
- func BuildHostConfig(ctx context.Context, docker *client.Client, dataDir string, ...) (*container.HostConfig, error)
- func CleanUpControlContainers(ctx context.Context, dockerClient *client.Client, instanceID string) error
- func CleanUpSatelliteContainers(ctx context.Context, dockerClient *client.Client, instanceID string) error
- func ResourceOptions(containerConfigs map[string]interface{}) (*container.HostConfig, error)
- func StopControlContainers(ctx context.Context, dockerClient *client.Client, instanceID, dataDir string) error
Constants ¶
View Source
const ( // StopTimeout defines a container stop timeout. StopTimeout = 30 * time.Second // StopPhysicalTimeout defines stop timeout for a physical container. StopPhysicalTimeout = 5 * time.Second // SyncInstanceContainerPrefix defines a sync container name. SyncInstanceContainerPrefix = "dblab_sync_" // DBLabControlLabel defines a label to mark service containers. DBLabControlLabel = "dblab_control" // DBLabSatelliteLabel defines a label to mark satellite containers. DBLabSatelliteLabel = "dblab_satellite" // DBLabInstanceIDLabel defines a label to mark service containers related to the current Database Lab instance. DBLabInstanceIDLabel = "dblab_instance_id" // DBLabEngineNameLabel defines the label value providing the container name of the current Database Lab instance. DBLabEngineNameLabel = "dblab_engine_name" // DBLabSyncLabel defines a label value for sync containers. DBLabSyncLabel = "dblab_sync" // DBLabPromoteLabel defines a label value for promote containers. DBLabPromoteLabel = "dblab_promote" // DBLabPatchLabel defines a label value for patch containers. DBLabPatchLabel = "dblab_patch" // DBLabDumpLabel defines a label value for dump containers. DBLabDumpLabel = "dblab_dump" // DBLabRestoreLabel defines a label value for restore containers. DBLabRestoreLabel = "dblab_restore" // DBLabEmbeddedUILabel defines a label value for embedded UI containers. DBLabEmbeddedUILabel = "dblab_embedded_ui" // DBLabRunner defines a label to mark runner containers. DBLabRunner = "dblab_runner" )
Variables ¶
This section is empty.
Functions ¶
func BuildHostConfig ¶
func BuildHostConfig(ctx context.Context, docker *client.Client, dataDir string, contConf map[string]interface{}) (*container.HostConfig, error)
BuildHostConfig builds host config.
func CleanUpControlContainers ¶
func CleanUpControlContainers(ctx context.Context, dockerClient *client.Client, instanceID string) error
CleanUpControlContainers removes control containers run by Database Lab Engine.
func CleanUpSatelliteContainers ¶
func CleanUpSatelliteContainers(ctx context.Context, dockerClient *client.Client, instanceID string) error
CleanUpSatelliteContainers removes satellite containers run by Database Lab Engine.
func ResourceOptions ¶
func ResourceOptions(containerConfigs map[string]interface{}) (*container.HostConfig, error)
ResourceOptions parses host config options.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.