Documentation ¶
Index ¶
- Constants
- func GetDiskInfo(info *ptypes.DiskInfo) *types.DiskInfo
- type BackupInfo
- type BackupList
- type PurgeStatus
- type RebuildStatus
- type SyncAgentServer
- func (s *SyncAgentServer) BackupCreate(ctx context.Context, req *ptypes.BackupCreateRequest) (*ptypes.BackupCreateReply, error)
- func (s *SyncAgentServer) BackupGetStatus(ctx context.Context, req *ptypes.BackupProgressRequest) (*ptypes.BackupStatusReply, error)
- func (*SyncAgentServer) BackupRemove(ctx context.Context, req *ptypes.BackupRemoveRequest) (*empty.Empty, error)
- func (s *SyncAgentServer) BackupRestore(ctx context.Context, req *ptypes.BackupRestoreRequest) (e *empty.Empty, err error)
- func (s *SyncAgentServer) BackupRestoreIncrementally(ctx context.Context, req *ptypes.BackupRestoreIncrementallyRequest) (e *empty.Empty, err error)
- func (*SyncAgentServer) FileRemove(ctx context.Context, req *ptypes.FileRemoveRequest) (*empty.Empty, error)
- func (*SyncAgentServer) FileRename(ctx context.Context, req *ptypes.FileRenameRequest) (*empty.Empty, error)
- func (s *SyncAgentServer) FileSend(ctx context.Context, req *ptypes.FileSendRequest) (*empty.Empty, error)
- func (s *SyncAgentServer) FilesSync(ctx context.Context, req *ptypes.FilesSyncRequest) (res *empty.Empty, err error)
- func (s *SyncAgentServer) FinishPurge() error
- func (s *SyncAgentServer) FinishRebuild() error
- func (s *SyncAgentServer) FinishRestore(currentRestored string) error
- func (s *SyncAgentServer) GetLastRestored() string
- func (s *SyncAgentServer) IsPurging() bool
- func (s *SyncAgentServer) IsRebuilding() bool
- func (s *SyncAgentServer) IsRestoring() bool
- func (s *SyncAgentServer) PreparePurge() error
- func (s *SyncAgentServer) PrepareRebuild(list []*ptypes.SyncFileInfo, fromReplicaAddress string) error
- func (s *SyncAgentServer) PrepareRestore(lastRestored string) error
- func (s *SyncAgentServer) ReceiverLaunch(ctx context.Context, req *ptypes.ReceiverLaunchRequest) (*ptypes.ReceiverLaunchReply, error)
- func (s *SyncAgentServer) ReplicaRebuildStatus(ctx context.Context, req *empty.Empty) (*ptypes.ReplicaRebuildStatusReply, error)
- func (s *SyncAgentServer) Reset(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
- func (s *SyncAgentServer) RestoreStatus(ctx context.Context, req *empty.Empty) (*ptypes.RestoreStatusReply, error)
- func (s *SyncAgentServer) SnapshotPurge(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
- func (s *SyncAgentServer) SnapshotPurgeStatus(ctx context.Context, req *empty.Empty) (*ptypes.SnapshotPurgeStatusReply, error)
Constants ¶
View Source
const ( MaxBackupSize = 5 PeriodicRefreshIntervalInSeconds = 2 GRPCServiceCommonTimeout = 1 * time.Minute FileSyncTimeout = 120 VolumeHeadName = "volume-head" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BackupInfo ¶
type BackupInfo struct {
// contains filtered or unexported fields
}
type BackupList ¶
func (*BackupList) BackupAdd ¶
func (b *BackupList) BackupAdd(backupID string, backup *replica.BackupStatus) error
BackupAdd creates a new backupList object and appends to the end of the list maintained by backup object
func (*BackupList) BackupDelete ¶
func (b *BackupList) BackupDelete(backupID string) error
BackupDelete will delete the entry in the slice with the corresponding backupID
func (*BackupList) BackupGet ¶
func (b *BackupList) BackupGet(backupID string) (*replica.BackupStatus, error)
BackupGet takes backupID input and will return the backup object corresponding to that backupID or error if not found
func (*BackupList) Refresh ¶
func (b *BackupList) Refresh() error
Refresh deletes all the old completed backups from the front. Old backups are the completed backups that are created before MaxBackupSize completed backups
type PurgeStatus ¶
type PurgeStatus struct { sync.RWMutex Error string Progress int State types.ProcessState // contains filtered or unexported fields }
func (*PurgeStatus) UpdateFoldFileProgress ¶
func (ps *PurgeStatus) UpdateFoldFileProgress(progress int, done bool, err error)
type RebuildStatus ¶
type RebuildStatus struct { sync.RWMutex Error string Progress int State types.ProcessState FromReplicaAddress string // contains filtered or unexported fields }
func (*RebuildStatus) UpdateSyncFileProgress ¶
func (rs *RebuildStatus) UpdateSyncFileProgress(size int64)
type SyncAgentServer ¶
type SyncAgentServer struct { sync.Mutex BackupList *BackupList RestoreInfo *replica.RestoreStatus PurgeStatus *PurgeStatus RebuildStatus *RebuildStatus // contains filtered or unexported fields }
func NewSyncAgentServer ¶
func NewSyncAgentServer(startPort, endPort int, replicaAddress string) *SyncAgentServer
func (*SyncAgentServer) BackupCreate ¶
func (s *SyncAgentServer) BackupCreate(ctx context.Context, req *ptypes.BackupCreateRequest) (*ptypes.BackupCreateReply, error)
func (*SyncAgentServer) BackupGetStatus ¶
func (s *SyncAgentServer) BackupGetStatus(ctx context.Context, req *ptypes.BackupProgressRequest) (*ptypes.BackupStatusReply, error)
func (*SyncAgentServer) BackupRemove ¶
func (*SyncAgentServer) BackupRemove(ctx context.Context, req *ptypes.BackupRemoveRequest) (*empty.Empty, error)
func (*SyncAgentServer) BackupRestore ¶
func (s *SyncAgentServer) BackupRestore(ctx context.Context, req *ptypes.BackupRestoreRequest) (e *empty.Empty, err error)
func (*SyncAgentServer) BackupRestoreIncrementally ¶
func (s *SyncAgentServer) BackupRestoreIncrementally(ctx context.Context, req *ptypes.BackupRestoreIncrementallyRequest) (e *empty.Empty, err error)
func (*SyncAgentServer) FileRemove ¶
func (*SyncAgentServer) FileRemove(ctx context.Context, req *ptypes.FileRemoveRequest) (*empty.Empty, error)
func (*SyncAgentServer) FileRename ¶
func (*SyncAgentServer) FileRename(ctx context.Context, req *ptypes.FileRenameRequest) (*empty.Empty, error)
func (*SyncAgentServer) FileSend ¶
func (s *SyncAgentServer) FileSend(ctx context.Context, req *ptypes.FileSendRequest) (*empty.Empty, error)
func (*SyncAgentServer) FilesSync ¶
func (s *SyncAgentServer) FilesSync(ctx context.Context, req *ptypes.FilesSyncRequest) (res *empty.Empty, err error)
func (*SyncAgentServer) FinishPurge ¶
func (s *SyncAgentServer) FinishPurge() error
func (*SyncAgentServer) FinishRebuild ¶
func (s *SyncAgentServer) FinishRebuild() error
func (*SyncAgentServer) FinishRestore ¶
func (s *SyncAgentServer) FinishRestore(currentRestored string) error
func (*SyncAgentServer) GetLastRestored ¶
func (s *SyncAgentServer) GetLastRestored() string
func (*SyncAgentServer) IsPurging ¶
func (s *SyncAgentServer) IsPurging() bool
func (*SyncAgentServer) IsRebuilding ¶
func (s *SyncAgentServer) IsRebuilding() bool
func (*SyncAgentServer) IsRestoring ¶
func (s *SyncAgentServer) IsRestoring() bool
func (*SyncAgentServer) PreparePurge ¶
func (s *SyncAgentServer) PreparePurge() error
func (*SyncAgentServer) PrepareRebuild ¶
func (s *SyncAgentServer) PrepareRebuild(list []*ptypes.SyncFileInfo, fromReplicaAddress string) error
func (*SyncAgentServer) PrepareRestore ¶
func (s *SyncAgentServer) PrepareRestore(lastRestored string) error
func (*SyncAgentServer) ReceiverLaunch ¶
func (s *SyncAgentServer) ReceiverLaunch(ctx context.Context, req *ptypes.ReceiverLaunchRequest) (*ptypes.ReceiverLaunchReply, error)
func (*SyncAgentServer) ReplicaRebuildStatus ¶
func (s *SyncAgentServer) ReplicaRebuildStatus(ctx context.Context, req *empty.Empty) (*ptypes.ReplicaRebuildStatusReply, error)
func (*SyncAgentServer) RestoreStatus ¶
func (s *SyncAgentServer) RestoreStatus(ctx context.Context, req *empty.Empty) (*ptypes.RestoreStatusReply, error)
func (*SyncAgentServer) SnapshotPurge ¶
func (*SyncAgentServer) SnapshotPurgeStatus ¶
func (s *SyncAgentServer) SnapshotPurgeStatus(ctx context.Context, req *empty.Empty) (*ptypes.SnapshotPurgeStatusReply, error)
Click to show internal directories.
Click to hide internal directories.