Documentation
¶
Index ¶
- type Lister
- type ListerV2
- type S3API
- type Service
- func (s *Service) GetStatus(ctx context.Context) error
- func (s *Service) ListBackups(ctx context.Context) error
- func (s *Service) ListBackupsV2(ctx context.Context) error
- func (s *Service) PrepareRestore(ctx context.Context) error
- func (s *Service) Run(ctx context.Context) error
- func (s *Service) StartBackup(ctx context.Context) error
- func (s *Service) StartRestore(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lister ¶
type Lister struct {
// contains filtered or unexported fields
}
Lister lists all backups in the given path.
type ListerV2 ¶
type ListerV2 struct {
// contains filtered or unexported fields
}
ListerV2 provides functionality to list backups from an S3 bucket. As development is ongoing, this is a work-in-progress, and may change. It supports listing all snapshots in a given prefix, or a single snapshot. The concurrency level can be configured, and the output can be logged or rendered to stderr. The logger is used for logging, and stderr is used for rendering.
type S3API ¶
type S3API interface {
ListObjectsV2(ctx context.Context, in *s3.ListObjectsV2Input, opts ...func(*s3.Options),
) (*s3.ListObjectsV2Output, error)
GetObject(ctx context.Context, in *s3.GetObjectInput, opts ...func(*s3.Options)) (*s3.GetObjectOutput, error)
}
S3API is an interface for the S3 client.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service represents a server integrated backup and restore service.
func NewService ¶
func NewService( ctx context.Context, cfg *config.ServerBackupServiceConfig, logger *slog.Logger, ) (*Service, error)
NewService initializes and returns a new Service instance.
func (*Service) PrepareRestore ¶
PrepareRestore initiates a restore preparation process for the specified job ID.
func (*Service) StartBackup ¶
StartBackup initiates a backup process using the service's configured backup settings and returns an error if it fails.