dockercompose

package
v0.0.0-...-91c7ab2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDockerCompose

func InitDockerCompose(storeRootDir string)

Types

type Container

type Container struct {
	// contains filtered or unexported fields
}

func NewContainer

func NewContainer(containerInfo model.ContainerInfo, containerConfig model.ContainerConfig) *Container

func (*Container) GetConfig

func (c *Container) GetConfig() (model.ContainerConfig, error)

func (*Container) GetInfo

func (c *Container) GetInfo() (model.ContainerInfo, error)

func (*Container) GetStatus

func (c *Container) GetStatus() (model.ContainerStatus, error)

func (*Container) Remove

func (c *Container) Remove() error

func (*Container) SetConfig

func (c *Container) SetConfig(config model.ContainerConfig) error

func (*Container) Start

func (c *Container) Start() error

func (*Container) Stop

func (c *Container) Stop() error

type DockerCompose

type DockerCompose struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

DockerCompose 管理多个容器

func GetInst

func GetInst() *DockerCompose

func (*DockerCompose) GetAllContainer

func (d *DockerCompose) GetAllContainer() []*Container

func (*DockerCompose) GetConfig

func (d *DockerCompose) GetConfig(containerName string) (model.ContainerConfig, error)

func (*DockerCompose) GetInfo

func (d *DockerCompose) GetInfo(containerName string) (model.ContainerInfo, error)

func (*DockerCompose) GetStatus

func (d *DockerCompose) GetStatus(containerName string) (model.ContainerStatus, error)

func (*DockerCompose) InstallContainer

func (d *DockerCompose) InstallContainer(jobID string, ci model.ContainerInfo, cc model.ContainerConfig, imageBody []byte) error

func (*DockerCompose) QueryJobState

func (d *DockerCompose) QueryJobState(jobID string) (state model.UpgradeState, process int, exist bool)

func (*DockerCompose) Remove

func (d *DockerCompose) Remove(containerName string) error

func (*DockerCompose) SelectJobResult

func (d *DockerCompose) SelectJobResult() <-chan UpgradeResult

func (*DockerCompose) SetConfig

func (d *DockerCompose) SetConfig(containerName string, config model.ContainerConfig) error

func (*DockerCompose) Start

func (d *DockerCompose) Start(containerName string) error

func (*DockerCompose) Stop

func (d *DockerCompose) Stop(containerName string) error

func (*DockerCompose) UpgradeContainer

func (d *DockerCompose) UpgradeContainer(jobID string, containerName string, version string, imageBody []byte) error

type Job

type Job struct {
	// contains filtered or unexported fields
}

func (*Job) GetError

func (j *Job) GetError() error

func (*Job) GetInstalled

func (j *Job) GetInstalled() bool

func (*Job) GetProcess

func (j *Job) GetProcess() int

func (*Job) GetState

func (j *Job) GetState() model.UpgradeState

func (*Job) Run

func (j *Job) Run()

type UpgradeResult

type UpgradeResult struct {
	JobID     string
	Installed bool
	Err       error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL