service

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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)
	Internal     bool              // If true, don't expose via Traefik
}

InstallOptions holds options for service installation

type Installer

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

Installer handles service installation

func NewInstaller

func NewInstaller(dockerClient *docker.Client, configMgr *config.Manager, catalogMgr *catalog.Manager) (*Installer, error)

NewInstaller creates a new service installer

func (*Installer) Install

func (i *Installer) Install(opts InstallOptions) (*types.Instance, error)

Install installs a service from the catalog

type Manager

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

Manager handles service instance management

func NewManager

func NewManager(dockerClient *docker.Client, configMgr *config.Manager) *Manager

NewManager creates a new service manager

func (*Manager) Get

func (m *Manager) Get(instanceName string) (*types.Instance, error)

Get retrieves a specific instance

func (*Manager) GetConnectionInfo

func (m *Manager) GetConnectionInfo(instanceName string) (*types.ConnectionInfo, error)

GetConnectionInfo returns connection information for a service

func (*Manager) GetLogs

func (m *Manager) GetLogs(instanceName string, follow bool) (string, error)

GetLogs retrieves logs from a service instance

func (*Manager) GetStats

func (m *Manager) GetStats(instanceName string) (dockerTypes.ContainerStats, 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) List

func (m *Manager) List() ([]*types.Instance, error)

List returns all service instances

func (*Manager) RefreshStatus

func (m *Manager) RefreshStatus() error

RefreshStatus updates the status of all instances

func (*Manager) Remove

func (m *Manager) Remove(instanceName string, force bool) error

Remove removes a service instance (stops and deletes)

func (*Manager) Restart

func (m *Manager) Restart(instanceName string) error

Restart restarts a service instance

func (*Manager) Start

func (m *Manager) Start(instanceName string) error

Start starts a stopped service instance

func (*Manager) Stop

func (m *Manager) Stop(instanceName string) error

Stop stops a running service instance

Jump to

Keyboard shortcuts

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