Documentation
¶
Index ¶
- type BackupHandler
- func (h *BackupHandler) Cancel(ctx context.Context, name string) error
- func (h *BackupHandler) ListFull(ctx context.Context, name string, from, to int64) error
- func (h *BackupHandler) ListIncremental(ctx context.Context, name string, from, to int64) error
- func (h *BackupHandler) Status(ctx context.Context, name string) error
- func (h *BackupHandler) TriggerFull(ctx context.Context, name string, delay int) error
- func (h *BackupHandler) TriggerIncremental(ctx context.Context, name string, delay int) error
- type ConfigHandler
- func (h *ConfigHandler) AddCluster(ctx context.Context, fields *models.ConfigClusterFields) error
- func (h *ConfigHandler) AddPolicy(ctx context.Context, fields *models.ConfigPolicyFields) error
- func (h *ConfigHandler) AddRoutine(ctx context.Context, fields *models.ConfigRoutineFields) error
- func (h *ConfigHandler) AddStorage(ctx context.Context, fields *models.ConfigStorageFields) error
- func (h *ConfigHandler) Apply(ctx context.Context) error
- func (h *ConfigHandler) DeleteCluster(ctx context.Context, name string) error
- func (h *ConfigHandler) DeletePolicy(ctx context.Context, name string) error
- func (h *ConfigHandler) DeleteRoutine(ctx context.Context, name string) error
- func (h *ConfigHandler) DeleteStorage(ctx context.Context, name string) error
- func (h *ConfigHandler) DisableRoutine(ctx context.Context, name string) error
- func (h *ConfigHandler) EnableRoutine(ctx context.Context, name string) error
- func (h *ConfigHandler) ListClusters(ctx context.Context) error
- func (h *ConfigHandler) ListPolicies(ctx context.Context) error
- func (h *ConfigHandler) ListRoutines(ctx context.Context) error
- func (h *ConfigHandler) ListStorage(ctx context.Context) error
- func (h *ConfigHandler) Read(ctx context.Context) error
- func (h *ConfigHandler) ReadCluster(ctx context.Context, name string) error
- func (h *ConfigHandler) ReadPolicy(ctx context.Context, name string) error
- func (h *ConfigHandler) ReadRoutine(ctx context.Context, name string) error
- func (h *ConfigHandler) ReadStorage(ctx context.Context, name string) error
- func (h *ConfigHandler) Update(ctx context.Context, file string) error
- func (h *ConfigHandler) UpdateCluster(ctx context.Context, fields *models.ConfigClusterFields) error
- func (h *ConfigHandler) UpdatePolicy(ctx context.Context, fields *models.ConfigPolicyFields) error
- func (h *ConfigHandler) UpdateRoutine(ctx context.Context, fields *models.ConfigRoutineFields) error
- func (h *ConfigHandler) UpdateStorage(ctx context.Context, fields *models.ConfigStorageFields) error
- type RestoreHandler
- func (h *RestoreHandler) Cancel(ctx context.Context, jobID int64) error
- func (h *RestoreHandler) ListJobs(ctx context.Context, from, to int64, status string) error
- func (h *RestoreHandler) RestoreFull(ctx context.Context, req *models.RestoreRequest) (string, error)
- func (h *RestoreHandler) RestoreIncremental(ctx context.Context, req *models.RestoreRequest) (string, error)
- func (h *RestoreHandler) RestoreTimestamp(ctx context.Context, req *models.RestoreTimestampRequest) (string, error)
- func (h *RestoreHandler) Status(ctx context.Context, jobID int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackupHandler ¶
type BackupHandler struct {
// contains filtered or unexported fields
}
BackupHandler handles backup-related REST API calls and renders responses either as human-readable tables/sections or as structured slog entries depending on the JSON output flag.
func NewBackupHandler ¶
NewBackupHandler creates a new BackupHandler. The logger and json flag are forwarded to the logging package which selects the appropriate renderer.
func (*BackupHandler) Cancel ¶
func (h *BackupHandler) Cancel(ctx context.Context, name string) error
Cancel cancels a currently running backup for the given routine.
func (*BackupHandler) ListFull ¶
ListFull fetches full backups (optionally filtered by routine name and time range) and prints them.
func (*BackupHandler) ListIncremental ¶
ListIncremental fetches incremental backups (optionally filtered by routine name and time range) and prints them.
func (*BackupHandler) Status ¶
func (h *BackupHandler) Status(ctx context.Context, name string) error
Status fetches the current backup state for the given routine and prints it.
func (*BackupHandler) TriggerFull ¶
TriggerFull triggers a full backup for the given routine.
func (*BackupHandler) TriggerIncremental ¶
TriggerIncremental triggers an incremental backup for the given routine.
type ConfigHandler ¶
type ConfigHandler struct {
// contains filtered or unexported fields
}
ConfigHandler handles configuration-related REST API calls under /v1/config and renders responses either as human-readable tables/sections or as structured slog entries depending on the JSON output flag.
func NewConfigHandler ¶
NewConfigHandler creates a new ConfigHandler. The logger and json flag are forwarded to the logging package which selects the appropriate renderer.
func (*ConfigHandler) AddCluster ¶
func (h *ConfigHandler) AddCluster(ctx context.Context, fields *models.ConfigClusterFields) error
AddCluster adds a new cluster definition built from individual flag fields.
func (*ConfigHandler) AddPolicy ¶
func (h *ConfigHandler) AddPolicy(ctx context.Context, fields *models.ConfigPolicyFields) error
AddPolicy adds a new backup policy built from individual flag fields.
func (*ConfigHandler) AddRoutine ¶
func (h *ConfigHandler) AddRoutine(ctx context.Context, fields *models.ConfigRoutineFields) error
AddRoutine adds a new backup routine built from individual flag fields.
func (*ConfigHandler) AddStorage ¶
func (h *ConfigHandler) AddStorage(ctx context.Context, fields *models.ConfigStorageFields) error
AddStorage adds a new storage entry built from individual flag fields.
func (*ConfigHandler) Apply ¶
func (h *ConfigHandler) Apply(ctx context.Context) error
Apply reloads the configuration from the configuration file on the server.
func (*ConfigHandler) DeleteCluster ¶
func (h *ConfigHandler) DeleteCluster(ctx context.Context, name string) error
DeleteCluster removes a cluster definition by name.
func (*ConfigHandler) DeletePolicy ¶
func (h *ConfigHandler) DeletePolicy(ctx context.Context, name string) error
DeletePolicy removes a backup policy by name.
func (*ConfigHandler) DeleteRoutine ¶
func (h *ConfigHandler) DeleteRoutine(ctx context.Context, name string) error
DeleteRoutine removes a backup routine by name.
func (*ConfigHandler) DeleteStorage ¶
func (h *ConfigHandler) DeleteStorage(ctx context.Context, name string) error
DeleteStorage removes a storage entry by name.
func (*ConfigHandler) DisableRoutine ¶
func (h *ConfigHandler) DisableRoutine(ctx context.Context, name string) error
DisableRoutine disables a backup routine by name.
func (*ConfigHandler) EnableRoutine ¶
func (h *ConfigHandler) EnableRoutine(ctx context.Context, name string) error
EnableRoutine enables a backup routine by name.
func (*ConfigHandler) ListClusters ¶
func (h *ConfigHandler) ListClusters(ctx context.Context) error
ListClusters fetches all configured Aerospike clusters and prints them.
func (*ConfigHandler) ListPolicies ¶
func (h *ConfigHandler) ListPolicies(ctx context.Context) error
ListPolicies fetches all configured backup policies and prints them.
func (*ConfigHandler) ListRoutines ¶
func (h *ConfigHandler) ListRoutines(ctx context.Context) error
ListRoutines fetches all configured backup routines and prints them.
func (*ConfigHandler) ListStorage ¶
func (h *ConfigHandler) ListStorage(ctx context.Context) error
ListStorage fetches all configured storage entries and prints them.
func (*ConfigHandler) Read ¶
func (h *ConfigHandler) Read(ctx context.Context) error
Read fetches the full service configuration and prints it.
func (*ConfigHandler) ReadCluster ¶
func (h *ConfigHandler) ReadCluster(ctx context.Context, name string) error
ReadCluster fetches a single configured cluster by name and prints it.
func (*ConfigHandler) ReadPolicy ¶
func (h *ConfigHandler) ReadPolicy(ctx context.Context, name string) error
ReadPolicy fetches a single backup policy by name and prints it.
func (*ConfigHandler) ReadRoutine ¶
func (h *ConfigHandler) ReadRoutine(ctx context.Context, name string) error
ReadRoutine fetches a single backup routine by name and prints it.
func (*ConfigHandler) ReadStorage ¶
func (h *ConfigHandler) ReadStorage(ctx context.Context, name string) error
ReadStorage fetches a single storage entry by name and prints it.
func (*ConfigHandler) Update ¶
func (h *ConfigHandler) Update(ctx context.Context, file string) error
Update replaces the full service configuration with the body loaded from file.
func (*ConfigHandler) UpdateCluster ¶
func (h *ConfigHandler) UpdateCluster(ctx context.Context, fields *models.ConfigClusterFields) error
UpdateCluster replaces an existing cluster definition with a body built from individual flag fields.
func (*ConfigHandler) UpdatePolicy ¶
func (h *ConfigHandler) UpdatePolicy(ctx context.Context, fields *models.ConfigPolicyFields) error
UpdatePolicy replaces an existing backup policy with a body built from individual flag fields.
func (*ConfigHandler) UpdateRoutine ¶
func (h *ConfigHandler) UpdateRoutine(ctx context.Context, fields *models.ConfigRoutineFields) error
UpdateRoutine replaces an existing backup routine with a body built from individual flag fields.
func (*ConfigHandler) UpdateStorage ¶
func (h *ConfigHandler) UpdateStorage(ctx context.Context, fields *models.ConfigStorageFields) error
UpdateStorage replaces an existing storage entry with a body built from individual flag fields.
type RestoreHandler ¶
type RestoreHandler struct {
// contains filtered or unexported fields
}
RestoreHandler handles restore-related REST API calls and renders responses either as human-readable tables/sections or as structured slog entries depending on the JSON output flag.
func NewRestoreHandler ¶
NewRestoreHandler creates a new RestoreHandler. The logger and json flag are forwarded to the logging package which selects the appropriate renderer.
func (*RestoreHandler) Cancel ¶
func (h *RestoreHandler) Cancel(ctx context.Context, jobID int64) error
Cancel cancels a running restore operation by job ID.
func (*RestoreHandler) ListJobs ¶
ListJobs fetches restore jobs (optionally filtered by time range and status) and prints them.
func (*RestoreHandler) RestoreFull ¶
func (h *RestoreHandler) RestoreFull(ctx context.Context, req *models.RestoreRequest) (string, error)
RestoreFull triggers an asynchronous full restore operation. Returns the new job ID (the API responds with a plain integer body) on success.
func (*RestoreHandler) RestoreIncremental ¶
func (h *RestoreHandler) RestoreIncremental(ctx context.Context, req *models.RestoreRequest) (string, error)
RestoreIncremental triggers an asynchronous incremental restore operation. Returns the new job ID on success.
func (*RestoreHandler) RestoreTimestamp ¶
func (h *RestoreHandler) RestoreTimestamp(ctx context.Context, req *models.RestoreTimestampRequest) (string, error)
RestoreTimestamp triggers an asynchronous restore-to-timestamp operation. Returns the new job ID on success.