rpc

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BackupListHighWaterMarkQuantum = 10

	MaxSnapshotHashJobSize = 10
)
View Source
const (
	PeriodicRefreshIntervalInSeconds = 2

	GRPCServiceCommonTimeout = 3 * time.Minute
)

Variables

This section is empty.

Functions

func NewSyncAgentServer

func NewSyncAgentServer(startPort, endPort int, replicaAddress, volumeName, instanceName string) *grpc.Server

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

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 SnapshotHashInfo added in v1.4.0

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

type SnapshotHashList added in v1.4.0

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

func (*SnapshotHashList) Add added in v1.4.0

func (s *SnapshotHashList) Add(snapshotName string, job *replica.SnapshotHashJob) error

func (*SnapshotHashList) Delete added in v1.4.0

func (s *SnapshotHashList) Delete(snapshotName string) error

Delete will delete the entry in the slice with the corresponding snapshotName

func (*SnapshotHashList) Get added in v1.4.0

func (s *SnapshotHashList) Get(snapshotName string) (*replica.SnapshotHashJob, error)

func (*SnapshotHashList) GetSize added in v1.4.0

func (s *SnapshotHashList) GetSize() int

type SyncAgentServer

type SyncAgentServer struct {
	sync.RWMutex

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

func (*SyncAgentServer) BackupCreate

func (*SyncAgentServer) BackupRemove

func (*SyncAgentServer) BackupRestore

func (s *SyncAgentServer) BackupRestore(ctx context.Context, req *ptypes.BackupRestoreRequest) (e *emptypb.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 *emptypb.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 *emptypb.Empty) (*ptypes.ReplicaRebuildStatusResponse, error)

func (*SyncAgentServer) Reset

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

func (*SyncAgentServer) RestoreStatus

func (*SyncAgentServer) SnapshotClone added in v1.2.0

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

func (*SyncAgentServer) SnapshotCloneStatus added in v1.2.0

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

func (*SyncAgentServer) SnapshotHash added in v1.4.0

func (*SyncAgentServer) SnapshotHashCancel added in v1.4.0

func (s *SyncAgentServer) SnapshotHashCancel(ctx context.Context, req *ptypes.SnapshotHashCancelRequest) (*emptypb.Empty, error)

func (*SyncAgentServer) SnapshotHashLockState added in v1.4.0

func (s *SyncAgentServer) SnapshotHashLockState(ctx context.Context, req *emptypb.Empty) (*ptypes.SnapshotHashLockStateResponse, error)

func (*SyncAgentServer) SnapshotHashStatus added in v1.4.0

func (*SyncAgentServer) SnapshotPurge

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

func (*SyncAgentServer) SnapshotPurgeStatus

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

func (*SyncAgentServer) StartRestore added in v1.1.0

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

func (*SyncAgentServer) VolumeExport added in v1.2.0

Jump to

Keyboard shortcuts

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