rpc

package
v1.3.3-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxBackupSize = 5

	PeriodicRefreshIntervalInSeconds = 2

	GRPCServiceCommonTimeout = 3 * time.Minute

	FileSyncTimeout = 120

	VolumeHeadName = "volume-head"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupInfo

type BackupInfo struct {
	// contains filtered or unexported fields
}

type BackupList

type BackupList struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

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 CloneStatus added in v1.2.0

type CloneStatus struct {
	sync.RWMutex
	Error              string
	Progress           int
	State              types.ProcessState
	FromReplicaAddress string
	SnapshotName       string
	// contains filtered or unexported fields
}

func (*CloneStatus) UpdateSyncFileProgress added in v1.2.0

func (cs *CloneStatus) UpdateSyncFileProgress(size int64)

type PurgeStatus

type PurgeStatus struct {
	sync.RWMutex
	Error    string
	Progress int
	State    types.ProcessState
	// contains filtered or unexported fields
}

func (*PurgeStatus) UpdateFileHandlingProgress added in v1.2.5

func (ps *PurgeStatus) UpdateFileHandlingProgress(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.RWMutex

	BackupList    *BackupList
	RestoreInfo   *replica.RestoreStatus
	PurgeStatus   *PurgeStatus
	RebuildStatus *RebuildStatus
	CloneStatus   *CloneStatus
	// contains filtered or unexported fields
}

func NewSyncAgentServer

func NewSyncAgentServer(startPort, endPort int, replicaAddress string) *SyncAgentServer

func (*SyncAgentServer) BackupCreate

func (*SyncAgentServer) BackupRemove

func (*SyncAgentServer) BackupRestore

func (s *SyncAgentServer) BackupRestore(ctx context.Context, req *ptypes.BackupRestoreRequest) (e *empty.Empty, err error)

func (*SyncAgentServer) BackupStatus added in v1.0.1

func (*SyncAgentServer) FileRemove

func (*SyncAgentServer) FileRename

func (*SyncAgentServer) FileSend

func (*SyncAgentServer) FilesSync

func (s *SyncAgentServer) FilesSync(ctx context.Context, req *ptypes.FilesSyncRequest) (res *empty.Empty, err error)

func (*SyncAgentServer) FinishClone added in v1.2.0

func (s *SyncAgentServer) FinishClone() error

func (*SyncAgentServer) FinishPurge

func (s *SyncAgentServer) FinishPurge() error

func (*SyncAgentServer) FinishRebuild

func (s *SyncAgentServer) FinishRebuild() error

func (*SyncAgentServer) FinishRestore

func (s *SyncAgentServer) FinishRestore(restoreErr error) (err error)

func (*SyncAgentServer) IsCloning added in v1.2.0

func (s *SyncAgentServer) IsCloning() bool

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) ReceiverLaunch

func (*SyncAgentServer) ReplicaRebuildStatus

func (s *SyncAgentServer) ReplicaRebuildStatus(ctx context.Context, req *empty.Empty) (*ptypes.ReplicaRebuildStatusResponse, error)

func (*SyncAgentServer) Reset

func (s *SyncAgentServer) Reset(ctx context.Context, req *empty.Empty) (*empty.Empty, error)

func (*SyncAgentServer) RestoreStatus

func (s *SyncAgentServer) RestoreStatus(ctx context.Context, req *empty.Empty) (*ptypes.RestoreStatusResponse, error)

func (*SyncAgentServer) SnapshotClone added in v1.2.0

func (s *SyncAgentServer) SnapshotClone(ctx context.Context, req *ptypes.SnapshotCloneRequest) (res *empty.Empty, err error)

func (*SyncAgentServer) SnapshotCloneStatus added in v1.2.0

func (s *SyncAgentServer) SnapshotCloneStatus(ctx context.Context, req *empty.Empty) (*ptypes.SnapshotCloneStatusResponse, error)

func (*SyncAgentServer) SnapshotPurge

func (s *SyncAgentServer) SnapshotPurge(ctx context.Context, req *empty.Empty) (*empty.Empty, error)

func (*SyncAgentServer) SnapshotPurgeStatus

func (s *SyncAgentServer) SnapshotPurgeStatus(ctx context.Context, req *empty.Empty) (*ptypes.SnapshotPurgeStatusResponse, error)

func (*SyncAgentServer) StartRestore added in v1.1.0

func (s *SyncAgentServer) StartRestore(backupURL, requestedBackupName, snapshotDiskName string) (err error)

func (*SyncAgentServer) VolumeExport added in v1.2.0

func (s *SyncAgentServer) VolumeExport(ctx context.Context, req *ptypes.VolumeExportRequest) (*empty.Empty, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL