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
// RunKubernetesCleanup executes Kubernetes resource cleanup
RunKubernetesCleanup(ctx context.Context, dryRun bool) error
// RunStaleAgentCleanup executes stale agent cleanup
RunStaleAgentCleanup(ctx context.Context, staleDuration time.Duration) error
// GetMaintenanceConfig returns the current maintenance configuration
GetMaintenanceConfig() *model.MaintenanceConfig
// UpdateMaintenanceConfig updates the maintenance configuration
UpdateMaintenanceConfig(config *model.MaintenanceConfig) error
// GetMaintenanceConfigByAction returns config for a specific action type
GetMaintenanceConfigByAction(actionType string) (*model.MaintenanceConfig, error)
// UpdateMaintenanceConfigByAction updates config for a specific action type
UpdateMaintenanceConfigByAction(actionType string, config *model.MaintenanceConfig) error
// IsKubernetesCleanupAvailable returns whether Kubernetes cleanup is available
IsKubernetesCleanupAvailable() bool
// GetMaintenanceStats returns maintenance statistics
GetMaintenanceStats() (*model.MaintenanceStats, error)
// SetKubernetesCleanupFunc sets the function to use for Kubernetes cleanup
SetKubernetesCleanupFunc(f func(ctx context.Context, dryRun bool) error)
// SetKubernetesCleanupEnabled sets whether Kubernetes cleanup is enabled for execution
SetKubernetesCleanupEnabled(enabled bool)
// SetVacuumEnvVarsConfigured sets whether vacuum-specific environment variables are overriding configuration
SetVacuumEnvVarsConfigured(vacuumEnvVarsSet bool)
// IsVacuumEnvVarsConfigured returns whether vacuum-specific environment variables are set
IsVacuumEnvVarsConfigured() bool
// SetKubernetesEnvVarsConfigured sets whether Kubernetes-specific environment variables are set
SetKubernetesEnvVarsConfigured(k8sEnvVarsSet bool)
// IsKubernetesEnvVarsConfigured returns whether Kubernetes-specific environment variables are set
IsKubernetesEnvVarsConfigured() bool
}
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 ¶
Click to show internal directories.
Click to hide internal directories.