Documentation
¶
Index ¶
- type RestorePreview
- type Service
- func (s *Service) CreateBranchAtLSN(projectID, sourceBranchID, newBranchName string, targetLSN int64) (*wal.Branch, error)
- func (s *Service) CreateBranchAtTime(projectID, sourceBranchID, newBranchName string, timestamp time.Time) (*wal.Branch, error)
- func (s *Service) GetRestorePreview(branchID string, targetLSN int64) (*RestorePreview, error)
- func (s *Service) ResetBranchToLSN(branchID string, targetLSN int64) (*wal.Branch, error)
- func (s *Service) ResetBranchToTime(branchID string, timestamp time.Time) (*wal.Branch, error)
- func (s *Service) ValidateRestore(branchID string, targetLSN int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RestorePreview ¶
type RestorePreview struct {
BranchID string
BranchName string
CurrentLSN int64
TargetLSN int64
OperationsToDiscard int
AffectedCollections map[string]int // collection -> operation count
CurrentCollections []string
TargetCollections []string
}
RestorePreview contains information about what a restore would do
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides branch restore and creation from historical points
func NewService ¶
func NewService( walService *wal.Service, branchService *branchwal.BranchService, materializerService *materializer.Service, timeTravelService *timetravel.Service, ) *Service
NewService creates a new restore service
func (*Service) CreateBranchAtLSN ¶
func (s *Service) CreateBranchAtLSN(projectID, sourceBranchID, newBranchName string, targetLSN int64) (*wal.Branch, error)
CreateBranchAtLSN creates a new branch from a historical point
func (*Service) CreateBranchAtTime ¶
func (s *Service) CreateBranchAtTime(projectID, sourceBranchID, newBranchName string, timestamp time.Time) (*wal.Branch, error)
CreateBranchAtTime creates a new branch from a specific timestamp
func (*Service) GetRestorePreview ¶
func (s *Service) GetRestorePreview(branchID string, targetLSN int64) (*RestorePreview, error)
GetRestorePreview shows what a restore operation would do
func (*Service) ResetBranchToLSN ¶
ResetBranchToLSN resets a branch to a historical LSN
func (*Service) ResetBranchToTime ¶
ResetBranchToTime resets a branch to a specific timestamp
Click to show internal directories.
Click to hide internal directories.