system

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: BSD-3-Clause Imports: 60 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

Variables

This section is empty.

Functions

func RegisterSystem

func RegisterSystem(api huma.API, h *SystemHandler)

Types

type ContainersActionInput

type ContainersActionInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Action        string `query:"action" required:"true" enum:"startall,startstopped,stopall" doc:"Bulk container action"`
}

type ConvertDockerRunInput

type ConvertDockerRunInput struct {
	EnvironmentID string                        `path:"id" doc:"Environment ID"`
	Body          types.ConvertDockerRunRequest `doc:"Docker run command"`
}

type ConvertDockerRunOutput

type ConvertDockerRunOutput struct {
	Body types.ConvertDockerRunResponse
}

type GetDockerInfoOutput

type GetDockerInfoOutput struct {
	Body types.DockerInfo
}

type Module

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

func New

func New(
	service *SystemService,
	activityService *activity.ActivityService,
	cfg *config.Config,
) *Module

func (*Module) RegisterRoutes

func (m *Module) RegisterRoutes(api huma.API, appCtx handlerutil.ActivityAppContext)

func (*Module) Service

func (m *Module) Service() *SystemService

type SystemBackupRun

type SystemBackupRun struct {
	database.BaseModel

	CreatedAt         time.Time                     `json:"createdAt" gorm:"column:created_at" sortable:"true"`
	Status            SystemBackupStatus            `json:"status" gorm:"column:status;type:text;not null" sortable:"true"`
	Trigger           SystemBackupTrigger           `json:"trigger" gorm:"column:trigger;type:text;not null" sortable:"true"`
	Destination       types.SystemBackupDestination `json:"destination" gorm:"column:destination;type:text;not null" sortable:"true"`
	LocalSnapshotID   string                        `json:"localSnapshotId,omitempty" gorm:"column:local_snapshot_id;type:text"`
	RemoteSnapshotID  string                        `json:"remoteSnapshotId,omitempty" gorm:"column:remote_snapshot_id;type:text"`
	S3DestinationID   string                        `json:"s3DestinationId,omitempty" gorm:"column:s3_destination_id;type:text;index"`
	S3DestinationName string                        `json:"s3DestinationName,omitempty" gorm:"-"`
	PolicyID          string                        `json:"policyId,omitempty" gorm:"column:policy_id;type:text;index"`
	Error             string                        `json:"error,omitempty" gorm:"column:error;type:text"`

	Size int64 `json:"size" gorm:"column:size" sortable:"true"`
}

func (SystemBackupRun) TableName

func (SystemBackupRun) TableName() string

func (SystemBackupRun) ToDTO

type SystemBackupStatus

type SystemBackupStatus string

type SystemBackupTrigger

type SystemBackupTrigger string

type SystemHandler

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

func NewHandler

func NewHandler(systemService *SystemService, appCtx context.Context) *SystemHandler

func (*SystemHandler) ConvertDockerRun

func (h *SystemHandler) ConvertDockerRun(ctx context.Context, input *ConvertDockerRunInput) (*ConvertDockerRunOutput, error)

func (*SystemHandler) GetDockerInfo

func (h *SystemHandler) GetDockerInfo(ctx context.Context, input *types.EnvironmentInput) (*GetDockerInfoOutput, error)

func (*SystemHandler) Health

func (h *SystemHandler) Health(ctx context.Context, input *types.EnvironmentInput) (*struct{}, error)

func (*SystemHandler) RunContainersAction

type SystemService

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

func NewSystemService

func NewSystemService(p SystemServiceParams) *SystemService

func (*SystemService) GetDockerHostMemory

func (s *SystemService) GetDockerHostMemory(ctx context.Context) (uint64, uint64, bool)

func (*SystemService) GetDockerInfo

func (s *SystemService) GetDockerInfo(ctx context.Context) (types.DockerInfo, error)

func (*SystemService) PingDocker

func (s *SystemService) PingDocker(ctx context.Context) error

func (*SystemService) PruneLocalBackupRepository

func (s *SystemService) PruneLocalBackupRepository(ctx context.Context) error

func (*SystemService) PruneScheduled

func (s *SystemService) PruneScheduled(ctx context.Context, environmentID string, req types.PruneAllRequest) (*types.PruneAllResult, bool, error)

func (*SystemService) PruneUpgradeLogs

func (s *SystemService) PruneUpgradeLogs(ctx context.Context, dataDir string, now time.Time) (int, error)

func (*SystemService) ReconcileInterruptedBackups

func (s *SystemService) ReconcileInterruptedBackups(ctx context.Context, protectedIDs ...string) error

func (*SystemService) ReconcileScheduledPrune

func (s *SystemService) ReconcileScheduledPrune(ctx context.Context, previous types.SchedulerRun) (types.SchedulerOutcome, error)

func (*SystemService) RegisterBackupJobOnStartup

func (s *SystemService) RegisterBackupJobOnStartup(ctx context.Context)

func (*SystemService) RegisterWorkflows

func (s *SystemService) RegisterWorkflows(engine *flow.Engine, environments *environment.EnvironmentService, roles *role.RoleService) error

func (*SystemService) ResumeUpgradeJobOnStartup

func (s *SystemService) ResumeUpgradeJobOnStartup(ctx context.Context)

func (*SystemService) RunUpgradeStreamProducer

func (s *SystemService) RunUpgradeStreamProducer(ctx context.Context, events chan<- types.UpgradeJob)

func (*SystemService) StartAllContainers

func (s *SystemService) StartAllContainers(ctx context.Context, environmentID string) (*types.ContainerActionResult, error)

func (*SystemService) StartAllStoppedContainers

func (s *SystemService) StartAllStoppedContainers(ctx context.Context, environmentID string) (*types.ContainerActionResult, error)

func (*SystemService) StopAllContainers

func (s *SystemService) StopAllContainers(ctx context.Context, environmentID string) (*types.ContainerActionResult, error)

func (*SystemService) TriggerUpgradeViaCLI

func (s *SystemService) TriggerUpgradeViaCLI(ctx context.Context, user types.Actor, target updater.SelfUpdateTarget) (string, error)

type SystemServiceParams

type SystemServiceParams struct {
	fx.In

	DB                 *database.DB
	DockerService      *dockerInternal.DockerClientService
	ContainerService   *container.ContainerService
	ImageUpdateService *imageupdate.ImageUpdateService
	VolumeService      *volume.VolumeService
	NetworkService     *network.NetworkService
	SettingsService    *settings.SettingsService
	ActivityService    *activity.ActivityService
	VersionService     *version.VersionService
	EventService       *event.EventService
	ProjectService     *project.ProjectService
	RegistryService    *registry.ContainerRegistryService
	BackupEngine       *backup.Engine
	BackupRepository   *backup.VolumeRepository
	S3Destinations     *s3.S3DestinationService
	RecoveryKeys       *backup.RecoveryKeyStore
	Policies           *backup.Policies
	Actors             *francis.Runtime
	Config             *config.Config
	SettingsEnv        settings.Env
	Ctx                context.Context
	Scheduler          types.DynamicScheduler
	Admission          *runs.Admission
}

Directories

Path Synopsis
children

Jump to

Keyboard shortcuts

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