Documentation
¶
Index ¶
- type ExistingData
- type InstallOptions
- type Installer
- type Manager
- func (m *Manager) Get(instanceName string) (*types.Instance, error)
- func (m *Manager) GetConnectionInfo(instanceName string) (*types.ConnectionInfo, error)
- func (m *Manager) GetContainerLogs(instanceName, containerName string, follow bool) (string, error)
- func (m *Manager) GetLogs(instanceName string, follow bool) (string, error)
- func (m *Manager) GetStats(instanceName string) (*docker.ContainerStatsResult, error)
- func (m *Manager) GetStatus(instanceName string) (types.ServiceStatus, error)
- func (m *Manager) List() ([]*types.Instance, error)
- func (m *Manager) Recreate(instanceName string) error
- func (m *Manager) RecreateWithImage(instanceName string, newImage string) error
- func (m *Manager) RefreshStatus() error
- func (m *Manager) Remove(instanceName string, force bool, removeVolumes bool) error
- func (m *Manager) Restart(instanceName string) error
- func (m *Manager) RestartWithInit(instanceName string, runInit bool, catalogMgr *catalog.Manager) error
- func (m *Manager) RestartWithPort(instanceName string, newPort int) error
- func (m *Manager) Start(instanceName string) error
- func (m *Manager) Stop(instanceName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExistingData ¶ added in v0.1.1
type ExistingData struct {
Volumes []string // List of existing volume names
EnvFiles []string // List of existing env file paths
HasData bool // True if any existing data was found
EnvVars map[string]string // Existing env variables (if env file exists)
}
ExistingData holds information about existing volumes and env files
type InstallOptions ¶
type InstallOptions struct {
ServiceName string // Service name from catalog
Version string // Version to install (empty = latest)
InstanceName string // Custom instance name (empty = auto-generate)
Environment map[string]string // Override environment variables
MemoryLimit string // Override memory limit
CPULimit string // Override CPU limit
Volumes map[string]string // Volume mappings (host:container)
PortMappings map[string]string // Port mappings (containerPort:hostPort as strings)
Internal bool // If true, don't expose via Traefik
// Dependency management (Phase 3)
SkipDependencies bool // If true, skip dependency resolution
AutoInstallDeps bool // If true, auto-install dependencies without prompting
IsDepend bool // Internal: true if this is being installed as a dependency
Replace bool // If true, replace existing instance without prompting
// Data reuse options
ReuseExistingData bool // If true, reuse existing volumes and env files
ForceCleanData bool // If true, delete existing data without prompting
}
InstallOptions holds options for service installation
type Installer ¶
type Installer struct {
// contains filtered or unexported fields
}
Installer handles service installation
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles service instance management
func NewManager ¶
NewManager creates a new service manager
func (*Manager) Get ¶
Get retrieves a specific instance (checks both catalog services and custom projects)
func (*Manager) GetConnectionInfo ¶
func (m *Manager) GetConnectionInfo(instanceName string) (*types.ConnectionInfo, error)
GetConnectionInfo returns connection information for a service
func (*Manager) GetContainerLogs ¶
GetContainerLogs retrieves logs from a specific container in a multi-container service
func (*Manager) GetStats ¶
func (m *Manager) GetStats(instanceName string) (*docker.ContainerStatsResult, error)
GetStats retrieves resource usage statistics
func (*Manager) GetStatus ¶
func (m *Manager) GetStatus(instanceName string) (types.ServiceStatus, error)
GetStatus retrieves the current status of an instance
func (*Manager) Recreate ¶ added in v0.1.1
Recreate recreates a service container to apply configuration changes (like environment variables) This stops, removes, and recreates the container with environment from the env file
func (*Manager) RecreateWithImage ¶ added in v0.1.1
RecreateWithImage recreates a container with a new image (for upgrades)
func (*Manager) RefreshStatus ¶
RefreshStatus updates the status of all instances
func (*Manager) RestartWithInit ¶ added in v0.1.1
func (m *Manager) RestartWithInit(instanceName string, runInit bool, catalogMgr *catalog.Manager) error
RestartWithInit restarts a service instance with optional init container execution
func (*Manager) RestartWithPort ¶ added in v0.1.1
RestartWithPort restarts a service instance with a new host port mapping This requires recreating the container since port mappings cannot be changed on existing containers