services

package
v4.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MaintenanceScheduler

type MaintenanceScheduler interface {
	// Start begins the maintenance scheduler
	Start() error
	// Stop stops the maintenance scheduler
	Stop()
	// UpdateSchedule updates the maintenance schedule
	UpdateSchedule(schedule string, enabled bool) error
	// RunManual runs maintenance manually (outside of schedule)
	RunManual() error
}

MaintenanceScheduler defines the interface for maintenance scheduling.

type MaintenanceService

type MaintenanceService interface {
	// RunMaintenance executes database maintenance operations
	RunMaintenance(ctx context.Context) error
	// GetMaintenanceConfig returns the current maintenance configuration
	GetMaintenanceConfig() *model.MaintenanceConfig
	// UpdateMaintenanceConfig updates the maintenance configuration
	UpdateMaintenanceConfig(config *model.MaintenanceConfig) error
	// GetMaintenanceStats returns maintenance statistics
	GetMaintenanceStats() (*model.MaintenanceStats, error)
}

MaintenanceService defines the interface for database maintenance operations.

type Manager

type Manager interface {
	SignaturePublicKey() crypto.PublicKey
	SecretServiceFromRepo(repo *model.Repo) secret.Service
	SecretService() secret.Service
	RegistryServiceFromRepo(repo *model.Repo) registry.Service
	RegistryService() registry.Service
	ConfigServiceFromRepo(repo *model.Repo) config.Service
	EnvironmentService() environment.Service
	ForgeFromRepo(repo *model.Repo) (forge.Forge, error)
	ForgeFromUser(user *model.User) (forge.Forge, error)
	ForgeByID(forgeID int64) (forge.Forge, error)
}

func NewManager

func NewManager(c *cli.Command, store store.Store, setupForge SetupForge) (Manager, error)

type SetupForge

type SetupForge func(forge *model.Forge) (forge.Forge, error)

type Store

type Store interface {
	store.Store
}

Store interface for maintenance service (to avoid circular imports).

Jump to

Keyboard shortcuts

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