manager

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxBackupSize = 5
)

Variables

This section is empty.

Functions

func NewServer

func NewServer(parentCtx context.Context, listenAddr, syncListenAddr, diskUUID, diskPathInContainer, portRange string, syncHandler sync.Handler) error

func ParsePortRange

func ParsePortRange(portRange string) (int32, int32, error)

Types

type BackupInfo added in v1.6.0

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

type BackupList added in v1.6.0

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

func (*BackupList) BackupAdd added in v1.6.0

func (b *BackupList) BackupAdd(backupID string, BackupStatus *backingimage.BackupStatus) error

BackupAdd creates a new backupList object and appends to the end of the list maintained by backup object

func (*BackupList) BackupGet added in v1.6.0

func (b *BackupList) BackupGet(backupID string) (*backingimage.BackupStatus, error)

BackupGet takes backupID input and will return the backup object corresponding to that backupID or error if not found

type Manager

type Manager struct {
	rpc.UnimplementedBackingImageManagerServiceServer

	BackupList *BackupList
	// contains filtered or unexported fields
}

func NewManager

func NewManager(ctx context.Context, syncAddress, diskUUID, diskPath, portRange string) (*Manager, error)

func (*Manager) BackupCreate added in v1.6.0

func (m *Manager) BackupCreate(ctx context.Context, req *rpc.BackupCreateRequest) (resp *empty.Empty, err error)

func (*Manager) BackupStatus added in v1.6.0

func (m *Manager) BackupStatus(ctx context.Context, req *rpc.BackupStatusRequest) (resp *rpc.BackupStatusResponse, err error)

func (*Manager) Delete

func (m *Manager) Delete(ctx context.Context, req *rpc.DeleteRequest) (resp *emptypb.Empty, err error)

func (*Manager) Fetch

func (m *Manager) Fetch(ctx context.Context, req *rpc.FetchRequest) (resp *rpc.BackingImageResponse, err error)

func (*Manager) Get

func (*Manager) List

func (m *Manager) List(ctx context.Context, req *emptypb.Empty) (*rpc.ListResponse, error)

func (*Manager) PrepareDownload

func (m *Manager) PrepareDownload(ctx context.Context, req *rpc.PrepareDownloadRequest) (resp *rpc.PrepareDownloadResponse, err error)

func (*Manager) Send

func (m *Manager) Send(ctx context.Context, req *rpc.SendRequest) (resp *emptypb.Empty, err error)

func (*Manager) Subscribe

func (m *Manager) Subscribe() (<-chan interface{}, error)

func (*Manager) Sync

func (m *Manager) Sync(ctx context.Context, req *rpc.SyncRequest) (resp *rpc.BackingImageResponse, err error)

func (*Manager) VersionGet

func (pm *Manager) VersionGet(ctx context.Context, empty *emptypb.Empty) (*rpc.VersionResponse, error)

func (*Manager) Watch

Jump to

Keyboard shortcuts

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