appcompose

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 InitAppCompose

func InitAppCompose(storeRootDir string)

Types

type App

type App struct {
	sync.RWMutex

	StartedAt time.Time
	StopAt    time.Time
	// contains filtered or unexported fields
}

func NewApp

func NewApp(ai model.AppInfo, ac model.AppConfig) *App

func (*App) Close

func (a *App) Close() error

func (*App) Disable

func (a *App) Disable() error

func (*App) Enable

func (a *App) Enable() error

func (*App) GetConfig

func (a *App) GetConfig() (model.AppConfig, error)

func (*App) GetInfo

func (a *App) GetInfo() (model.AppInfo, error)

func (*App) GetStatus

func (a *App) GetStatus() (model.AppStatus, error)

func (*App) SetConfig

func (a *App) SetConfig(cc model.AppConfig) error

func (*App) Start

func (a *App) Start() error

func (*App) Stop

func (a *App) Stop() error

type AppCompose

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

func GetInst

func GetInst() *AppCompose

func (*AppCompose) Disable

func (a *AppCompose) Disable(containerName, appName string) error

func (*AppCompose) Enable

func (a *AppCompose) Enable(containerName, appName string) error

func (*AppCompose) GetConfig

func (a *AppCompose) GetConfig(containerName, appName string) (model.AppConfig, error)

func (*AppCompose) GetConnApps

func (a *AppCompose) GetConnApps(containerName string) []*App

func (*AppCompose) GetInfo

func (a *AppCompose) GetInfo(containerName, appName string) (model.AppInfo, error)

func (*AppCompose) GetStatus

func (a *AppCompose) GetStatus(containerName, appName string) (model.AppStatus, error)

func (*AppCompose) InstallApp

func (a *AppCompose) InstallApp(jobID string, ai model.AppInfo, ac model.AppConfig, imageBody []byte) error

func (*AppCompose) QueryJobState

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

func (*AppCompose) Remove

func (a *AppCompose) Remove(containerName, appName string) error

func (*AppCompose) SelectJobResult

func (a *AppCompose) SelectJobResult() <-chan UpgradeResult

func (*AppCompose) SetConfig

func (a *AppCompose) SetConfig(containerName, appName string, config model.AppConfig) error

func (*AppCompose) Start

func (a *AppCompose) Start(containerName, appName string) error

func (*AppCompose) Stop

func (a *AppCompose) Stop(containerName, appName string) error

func (*AppCompose) UpgradeApp

func (a *AppCompose) UpgradeApp(jobID string, containerName, appName, version string, appBody []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