module

package
v1.0.39 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitBuiltinTemplates

func InitBuiltinTemplates(store *storage.Store) error

InitBuiltinTemplates creates/updates built-in module templates Only includes templates with real, working Docker images

Types

type Manager

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

Manager handles the lifecycle of modules

func NewManager

func NewManager(store *storage.Store, dockerCli *docker.Client, sender *command.Sender, cfg *config.Config, proxyManager *proxy.Manager, log *logger.Logger) *Manager

NewManager creates a new module manager

func NewManagerWithPool

func NewManagerWithPool(store *storage.Store, dockerCli *docker.Client, pool *docker.ClientPool, sender *command.Sender, cfg *config.Config, proxyManager *proxy.Manager, log *logger.Logger) *Manager

NewManagerWithPool creates a new module manager with a multi-node ClientPool. If pool is nil and dockerCli is non-nil, a single-node pool wrapping dockerCli is created.

func (*Manager) AllocateModulePort

func (m *Manager) AllocateModulePort(ctx context.Context) (int, error)

AllocateModulePort finds an available port for a module

func (*Manager) AllocateModulePortExcluding

func (m *Manager) AllocateModulePortExcluding(ctx context.Context, exclude map[int]bool) (int, error)

AllocateModulePortExcluding finds an available port, excluding any ports in the exclude map

func (*Manager) CreateAndStartModule

func (m *Manager) CreateAndStartModule(ctx context.Context, moduleID string, startImmediately bool) error

CreateAndStartModule creates a container and optionally starts the module

func (*Manager) DeleteModule

func (m *Manager) DeleteModule(ctx context.Context, moduleID string) error

DeleteModule stops and removes a module and its container

func (*Manager) GetModuleStatus

func (m *Manager) GetModuleStatus(ctx context.Context, moduleID string) (storage.ModuleStatus, error)

GetModuleStatus returns current status from Docker

func (*Manager) GetUsedModulePorts

func (m *Manager) GetUsedModulePorts(ctx context.Context) ([]int, error)

GetUsedModulePorts returns all ports currently in use by modules

func (*Manager) HandleServerEvent

func (m *Manager) HandleServerEvent(ctx context.Context, event events.Event)

Module subsystem subscription to the central event bus

func (*Manager) IsRunning

func (m *Manager) IsRunning() bool

IsRunning returns whether the manager is running

func (*Manager) RecreateModule

func (m *Manager) RecreateModule(ctx context.Context, moduleID string) error

RecreateModule recreates a module container

func (*Manager) RestartModule

func (m *Manager) RestartModule(ctx context.Context, moduleID string) error

RestartModule restarts a module

func (*Manager) SetLogStreamer

func (m *Manager) SetLogStreamer(streamer *logger.LogStreamer)

SetLogStreamer sets the log streamer for module containers

func (*Manager) Start

func (m *Manager) Start() error

Start initializes the module manager

func (*Manager) StartModule

func (m *Manager) StartModule(ctx context.Context, moduleID string) error

StartModule starts an existing module container

func (*Manager) Stop

func (m *Manager) Stop() error

Stop gracefully stops all managed modules

func (*Manager) StopModule

func (m *Manager) StopModule(ctx context.Context, moduleID string) error

StopModule stops a running module

Jump to

Keyboard shortcuts

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