Documentation ¶
Overview ¶
adapted from https://github.com/DefangLabs/defang LICENSE MIT License Copyright (c) 2024 Defang Software Labs
Index ¶
- type Bind
- type Compose
- func (app *Compose) AttachVolumesForService(service string) error
- func (app *Compose) CreateBindsForService(service string) error
- func (app *Compose) CreateGPUForService(service string) error
- func (app *Compose) CreateVolumesForService(service string) error
- func (app *Compose) DeleteVolumesForService(service string) error
- func (c *Compose) DependentsForService(s string) ([]string, error)
- func (app *Compose) Down(force, volumes bool, timeout int) error
- func (app *Compose) Export(volumes bool, customVolumesOnly bool) error
- func (app *Compose) ExportInstance(service string, volumes bool) error
- func (app *Compose) ExportVolume(pool, volume string) error
- func (app *Compose) GetProfiles() []string
- func (app *Compose) GetProject() string
- func (app *Compose) Info() error
- func (app *Compose) InitContainerForService(service string) error
- func (c *Compose) ListServices() []string
- func (app *Compose) ListVolumesForService(service string) ([]string, error)
- func (app *Compose) Order(reverse bool) []string
- func (c *Compose) ParseServers(remotes ...string) ([]remoteResource, error)
- func (app *Compose) Remove(timeout int, force, stop, volumes bool) error
- func (app *Compose) RemoveContainerForService(service string, force bool) error
- func (app *Compose) Restart() error
- func (app *Compose) RestartContainerForService(service string) error
- func (app *Compose) SanityCheck() error
- func (app *Compose) Snapshot(noexpiry, stateful, volumes bool) error
- func (app *Compose) SnapshotInstance(service string, noexpiry, stateful, volumes bool) error
- func (app *Compose) SnapshotVolume(pool, volume string, noexpiry, stateful, volumes bool) error
- func (app *Compose) Start(wait bool) error
- func (c *Compose) StartAll(wait bool) error
- func (app *Compose) StartContainerForService(service string, wait bool) error
- func (c *Compose) StartService(s string, wait bool) error
- func (app *Compose) Stop(stateful, force bool, timeout int) error
- func (c *Compose) StopAll(stateful, force bool, timeout int) error
- func (app *Compose) StopContainerForService(service string, stateful, force bool, timeout int) error
- func (c *Compose) StopService(s string, stateful, force bool, timeout int) error
- func (c *Compose) String() string
- func (app *Compose) Up() error
- type SanityCheckError
- type Service
- type Snapshot
- type Volume
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compose ¶
type Compose struct { Name string `yaml:"name" validate:"required"` Project string `yaml:"project,omitempty" validate:"project-exists"` Services map[string]Service `yaml:"services" validate:"required,dive,required"` Profiles []string `yaml:"profiles" validate:"dive,profile-exists"` ExportPath string `yaml:"export_path,omitempty"` Dag graph.Graph[string, string] `yaml:"-"` ComposeProject *types.Project `yaml:"-"` // contains filtered or unexported fields }
func (*Compose) AttachVolumesForService ¶
func (*Compose) CreateBindsForService ¶
func (*Compose) CreateGPUForService ¶
func (*Compose) CreateVolumesForService ¶
func (*Compose) DeleteVolumesForService ¶
func (*Compose) DependentsForService ¶
func (*Compose) ExportInstance ¶
func (*Compose) ExportVolume ¶
func (*Compose) GetProfiles ¶
func (*Compose) GetProject ¶
func (*Compose) InitContainerForService ¶
func (*Compose) ListServices ¶
func (*Compose) ListVolumesForService ¶
func (*Compose) Order ¶
Order returns the order in which services should be started or stopped. If reverse is true, the order is reversed. Use reverse=true for starting services. Use reverse=false for stopping services.
func (*Compose) ParseServers ¶
func (*Compose) RemoveContainerForService ¶
func (*Compose) RestartContainerForService ¶
func (*Compose) SanityCheck ¶
func (*Compose) SnapshotInstance ¶
func (*Compose) SnapshotVolume ¶
func (*Compose) StartContainerForService ¶
func (*Compose) StopContainerForService ¶
func (*Compose) StopService ¶
type SanityCheckError ¶
func (*SanityCheckError) Error ¶
func (e *SanityCheckError) Error() string
type Service ¶
type Service struct { Name string `yaml:"name" validate:"required"` Image string `yaml:"image" validate:"required"` GPU bool `yaml:"gpu,omitempty"` Volumes map[string]*Volume `yaml:"volumes,omitempty" validate:"dive,required"` BindMounts map[string]Bind `yaml:"binds,omitempty"` AdditionalProfiles []string `yaml:"additional_profiles,omitempty" validate:"dive,profile-exists"` EnvironmentFile string `yaml:"environment_file,omitempty"` Environment map[string]*string `yaml:"environment,omitempty"` CloudInitUserData string `yaml:"cloud_init_user_data,omitempty"` CloudInitUserDataFile string `yaml:"cloud_init_user_data_file,omitempty"` Snapshot *Snapshot `yaml:"snapshot,omitempty"` DependsOn []string `yaml:"depends_on,omitempty"` InventoryGroups []string `yaml:"inventory_groups,omitempty"` Storage string `yaml:"storage,omitempty"` }
Click to show internal directories.
Click to hide internal directories.