engineapi

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: 41 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CurrentBackingImageManagerAPIVersion = 3
	MinBackingImageManagerAPIVersion     = 3
	UnknownBackingImageManagerAPIVersion = 0
)
View Source
const (
	BackupMonitorSyncPeriod = 2 * time.Second

	// BackupMonitorMaxRetryPeriod is the maximum retry period when backup monitor routine
	// encounters an error and backup stays in Pending state
	BackupMonitorMaxRetryPeriod = 24 * time.Hour
)
View Source
const (
	ProcessStateInProgress = "in_progress"
	ProcessStateComplete   = "complete"
	ProcessStateError      = "error"

	ErrNotImplement = "not implemented"
)

Should be the same values as in https://github.com/longhorn/longhorn-engine/blob/master/pkg/types/types.go

View Source
const (
	CurrentInstanceManagerAPIVersion = 6
	MinInstanceManagerAPIVersion     = 1
	UnknownInstanceManagerAPIVersion = 0

	UnknownInstanceManagerProxyAPIVersion = 0
	// UnsupportedInstanceManagerProxyAPIVersion means the instance manager without the proxy client (Longhorn release before v1.3.0)
	UnsupportedInstanceManagerProxyAPIVersion = 0

	DefaultEnginePortCount = 1

	DefaultReplicaPortCountV1 = 10
	DefaultReplicaPortCountV2 = 5

	DefaultPortArg         = "--listen,0.0.0.0:"
	DefaultTerminateSignal = "SIGHUP"

	// IncompatibleInstanceManagerAPIVersion means the instance manager version in v0.7.0
	IncompatibleInstanceManagerAPIVersion = -1
	DeprecatedInstanceManagerBinaryName   = "longhorn-instance-manager"
)
View Source
const (
	CLIVersionFour = 4
	CLIVersionFive = 5

	// CLIAPIMinVersionForExistingEngineBeforeUpgrade will enable already created volumes before the upgrade to operate normally.
	// Additionally, they will not be impacted by the new engine upgrade enforcement mechanism.
	// This mechanism exclusively focuses on preventing users from creating or updating a volume, engine, or replica using any incompatible version.
	// It is strictly bound to the default engine image of the release, emeta.CLIAPIMinVersion.
	CLIAPIMinVersionForExistingEngineBeforeUpgrade = 3

	InstanceManagerProcessManagerServiceDefaultPort = 8500
	InstanceManagerProxyServiceDefaultPort          = InstanceManagerProcessManagerServiceDefaultPort + 1 // 8501
	InstanceManagerDiskServiceDefaultPort           = InstanceManagerProcessManagerServiceDefaultPort + 2 // 8502
	InstanceManagerInstanceServiceDefaultPort       = InstanceManagerProcessManagerServiceDefaultPort + 3 // 8503
	InstanceManagerSpdkServiceDefaultPort           = InstanceManagerProcessManagerServiceDefaultPort + 4 // 8504

	BackingImageManagerDefaultPort    = 8000
	BackingImageDataSourceDefaultPort = 8000
	BackingImageSyncServerDefaultPort = 8001

	ShareManagerDefaultPort = 9600

	EndpointISCSIPrefix = "iscsi://"
	DefaultISCSIPort    = "3260"
	DefaultISCSILUN     = "1"

	MaxPollCount = 60
	MinPollCount = 1
	PollInterval = 1 * time.Second

	BackingImageDataSourcePollInterval = 3 * PollInterval

	MaxMonitorRetryCount = 10
)

Variables

This section is empty.

Functions

func CheckBackingImageManagerCompatibility added in v1.4.0

func CheckBackingImageManagerCompatibility(bimMinVersion, bimVersion int) error

func CheckCLICompatibility added in v1.4.0

func CheckCLICompatibility(cliVersion, cliMinVersion int) error

func CheckInstanceManagerCompatibility added in v1.4.0

func CheckInstanceManagerCompatibility(imMinVersion, imVersion int) error

func CheckInstanceManagerProxySupport added in v1.3.0

func CheckInstanceManagerProxySupport(im *longhorn.InstanceManager) error

func ConvertEngineBackupState added in v1.2.3

func ConvertEngineBackupState(state string) longhorn.BackupState

ConvertEngineBackupState converts longhorn engine backup state to Backup CR state

func GetAddressFromBackendReplicaURL added in v0.6.0

func GetAddressFromBackendReplicaURL(url string) string

func GetBackendReplicaURL added in v0.6.0

func GetBackendReplicaURL(address string) string

func GetDeprecatedInstanceManagerBinary added in v0.8.0

func GetDeprecatedInstanceManagerBinary(image string) string

func GetEngineEndpoint added in v1.1.3

func GetEngineEndpoint(volume *Volume, ip string) (string, error)

func GetEngineInstanceFrontend added in v1.5.0

func GetEngineInstanceFrontend(dataEngine longhorn.DataEngineType, volumeFrontend longhorn.VolumeFrontend) (frontend string, err error)

func IsEndpointTGTBlockDev added in v1.4.0

func IsEndpointTGTBlockDev(endpoint string) bool

func ValidateReplicaURL

func ValidateReplicaURL(url string) error

Types

type BackingImageDataSourceClient added in v1.2.0

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

func NewBackingImageDataSourceClient added in v1.2.0

func NewBackingImageDataSourceClient(ip string) *BackingImageDataSourceClient

func (*BackingImageDataSourceClient) Get added in v1.2.0

func (*BackingImageDataSourceClient) Transfer added in v1.3.0

func (c *BackingImageDataSourceClient) Transfer() error

type BackingImageDataSourceInfo added in v1.2.0

type BackingImageDataSourceInfo struct {
	DiskUUID   string            `json:"diskUUID"`
	SourceType string            `json:"sourceType"`
	Parameters map[string]string `json:"parameters"`

	Name            string `json:"name"`
	UUID            string `json:"uuid"`
	FilePath        string `json:"filePath"`
	State           string `json:"state"`
	Size            int64  `json:"size"`
	Progress        int    `json:"progress"`
	ProcessedSize   int64  `json:"processedSize"`
	CurrentChecksum string `json:"currentChecksum"`
	Message         string `json:"message"`
}

type BackingImageManagerClient added in v1.1.1

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

func NewBackingImageManagerClient added in v1.1.1

func NewBackingImageManagerClient(bim *longhorn.BackingImageManager) (*BackingImageManagerClient, error)

func (*BackingImageManagerClient) BackupCreate added in v1.6.0

func (c *BackingImageManagerClient) BackupCreate(name, uuid, checksum, backupTargetURL string, labels, credential map[string]string, compressionMethod string, concurrentLimit int) error

func (*BackingImageManagerClient) BackupStatus added in v1.6.0

func (*BackingImageManagerClient) Delete added in v1.1.1

func (c *BackingImageManagerClient) Delete(name, uuid string) error

func (*BackingImageManagerClient) Fetch added in v1.2.0

func (c *BackingImageManagerClient) Fetch(name, uuid, checksum, dataSourceAddress string, size int64) (*longhorn.BackingImageFileInfo, error)

func (*BackingImageManagerClient) Get added in v1.1.1

func (*BackingImageManagerClient) List added in v1.1.1

func (*BackingImageManagerClient) PrepareDownload added in v1.3.0

func (c *BackingImageManagerClient) PrepareDownload(name, uuid string) (string, string, error)

func (*BackingImageManagerClient) Sync added in v1.1.1

func (c *BackingImageManagerClient) Sync(name, uuid, checksum, fromHost string, size int64) (*longhorn.BackingImageFileInfo, error)

func (*BackingImageManagerClient) VersionGet added in v1.1.1

func (c *BackingImageManagerClient) VersionGet() (int, int, error)

func (*BackingImageManagerClient) Watch added in v1.1.1

type Backup

type Backup struct {
	Name                   string               `json:"name"`
	State                  longhorn.BackupState `json:"state"`
	URL                    string               `json:"url"`
	SnapshotName           string               `json:"snapshotName"`
	SnapshotCreated        string               `json:"snapshotCreated"`
	Created                string               `json:"created"`
	Size                   string               `json:"size"`
	Labels                 map[string]string    `json:"labels"`
	VolumeName             string               `json:"volumeName"`
	VolumeSize             string               `json:"volumeSize"`
	VolumeCreated          string               `json:"volumeCreated"`
	VolumeBackingImageName string               `json:"volumeBackingImageName"`
	Messages               map[string]string    `json:"messages"`
	CompressionMethod      string               `json:"compressionMethod"`
	Parameters             map[string]string    `json:"parameters"`
	NewlyUploadedDataSize  string               `json:"newlyUploadedDataSize"`
	ReUploadedDataSize     string               `json:"reUploadedDataSize"`
}

type BackupBackingImageMonitor added in v1.6.0

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

func NewBackupBackingImageMonitor added in v1.6.0

func NewBackupBackingImageMonitor(logger logrus.FieldLogger, ds *datastore.DataStore, bbi *longhorn.BackupBackingImage, backingImage *longhorn.BackingImage, backupTargetClient *BackupTargetClient,
	compressionMethod longhorn.BackupCompressionMethod, concurrentLimit int, bimClient *BackingImageManagerClient, syncCallback func(key string)) (*BackupBackingImageMonitor, error)

func (*BackupBackingImageMonitor) Close added in v1.6.0

func (m *BackupBackingImageMonitor) Close()

func (*BackupBackingImageMonitor) GetBackupBackingImageStatus added in v1.6.0

func (m *BackupBackingImageMonitor) GetBackupBackingImageStatus() longhorn.BackupBackingImageStatus

type BackupCreateInfo added in v0.6.0

type BackupCreateInfo struct {
	BackupID       string
	ReplicaAddress string
	IsIncremental  bool
}

type BackupMonitor added in v1.2.3

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

func NewBackupMonitor added in v1.2.3

func NewBackupMonitor(logger logrus.FieldLogger, ds *datastore.DataStore, backup *longhorn.Backup, volume *longhorn.Volume, backupTargetClient *BackupTargetClient,
	biChecksum string, compressionMethod longhorn.BackupCompressionMethod, concurrentLimit int, storageClassName string, engine *longhorn.Engine, engineClientProxy EngineClientProxy,
	syncCallback func(key string)) (*BackupMonitor, error)

func (*BackupMonitor) Close added in v1.2.3

func (m *BackupMonitor) Close()

func (*BackupMonitor) GetBackupStatus added in v1.2.3

func (m *BackupMonitor) GetBackupStatus() longhorn.BackupStatus

type BackupTarget

type BackupTarget struct {
	Name             string `json:"name"`
	BackupTargetURL  string `json:"backupTargetURL"`
	CredentialSecret string `json:"credentialSecret"`
	PollInterval     string `json:"pollInterval"`
	Available        bool   `json:"available"`
	Message          string `json:"message"`
}

type BackupTargetClient added in v1.2.0

type BackupTargetClient struct {
	Image      string
	URL        string
	Credential map[string]string
}

func NewBackupTargetClient added in v1.2.0

func NewBackupTargetClient(engineImage, url string, credential map[string]string) *BackupTargetClient

NewBackupTargetClient returns the backup target client

func NewBackupTargetClientFromBackupTarget added in v1.4.0

func NewBackupTargetClientFromBackupTarget(backupTarget *longhorn.BackupTarget, ds *datastore.DataStore) (*BackupTargetClient, error)

func (*BackupTargetClient) BackupBackingImageDelete added in v1.6.0

func (btc *BackupTargetClient) BackupBackingImageDelete(backupURL string) error

BackupBackingImageDelete deletes the backup volume from the remote backup target

func (*BackupTargetClient) BackupBackingImageGet added in v1.6.0

func (btc *BackupTargetClient) BackupBackingImageGet(backupBackingImageURL string) (*backupbackingimage.BackupInfo, error)

BackupBackingImageGet inspects a backup config with the given backup config URL

func (*BackupTargetClient) BackupBackingImageNameList added in v1.6.0

func (btc *BackupTargetClient) BackupBackingImageNameList() ([]string, error)

BackupBackingImageNameList returns a list of backup backing image names

func (*BackupTargetClient) BackupCleanUpAllMounts added in v1.4.2

func (btc *BackupTargetClient) BackupCleanUpAllMounts() (err error)

BackupCleanUpAllMounts clean up all mount points of backup store on the node

func (*BackupTargetClient) BackupConfigMetaGet added in v1.3.0

func (btc *BackupTargetClient) BackupConfigMetaGet(url string, credential map[string]string) (*ConfigMetadata, error)

BackupConfigMetaGet returns the config metadata with the given URL

func (*BackupTargetClient) BackupDelete added in v1.3.0

func (btc *BackupTargetClient) BackupDelete(backupURL string, credential map[string]string) error

BackupDelete deletes the backup from the remote backup target

func (*BackupTargetClient) BackupGet added in v1.3.0

func (btc *BackupTargetClient) BackupGet(backupConfigURL string, credential map[string]string) (*Backup, error)

BackupGet inspects a backup config with the given backup config URL

func (*BackupTargetClient) BackupNameList added in v1.3.0

func (btc *BackupTargetClient) BackupNameList(destURL, volumeName string, credential map[string]string) ([]string, error)

BackupNameList returns a list of backup names

func (*BackupTargetClient) BackupVolumeDelete added in v1.3.0

func (btc *BackupTargetClient) BackupVolumeDelete(destURL, volumeName string, credential map[string]string) error

BackupVolumeDelete deletes the backup volume from the remote backup target

func (*BackupTargetClient) BackupVolumeGet added in v1.3.0

func (btc *BackupTargetClient) BackupVolumeGet(backupVolumeURL string, credential map[string]string) (*BackupVolume, error)

BackupVolumeGet inspects a backup volume config with the given volume config URL

func (*BackupTargetClient) BackupVolumeNameList added in v1.3.0

func (btc *BackupTargetClient) BackupVolumeNameList() ([]string, error)

BackupVolumeNameList returns a list of backup volume names

func (*BackupTargetClient) DeleteSystemBackup added in v1.4.0

func (btc *BackupTargetClient) DeleteSystemBackup(systemBackup *longhorn.SystemBackup) (string, error)

DeleteSystemBackup deletes system backup in the backup target

func (*BackupTargetClient) DownloadSystemBackup added in v1.4.0

func (btc *BackupTargetClient) DownloadSystemBackup(name, version, downloadPath string) error

DownloadSystemBackup downloads system backup from the backup target

func (*BackupTargetClient) ExecuteEngineBinary added in v1.2.0

func (btc *BackupTargetClient) ExecuteEngineBinary(args ...string) (string, error)

func (*BackupTargetClient) ExecuteEngineBinaryWithTimeout added in v1.4.0

func (btc *BackupTargetClient) ExecuteEngineBinaryWithTimeout(timeout time.Duration, args ...string) (string, error)

func (*BackupTargetClient) ExecuteEngineBinaryWithoutTimeout added in v1.2.0

func (btc *BackupTargetClient) ExecuteEngineBinaryWithoutTimeout(args ...string) (string, error)

func (*BackupTargetClient) GetSystemBackupConfig added in v1.4.0

func (btc *BackupTargetClient) GetSystemBackupConfig(name, version string) (*systembackupstore.Config, error)

GetSystemBackupConfig returns the system backup config from the backup target

func (*BackupTargetClient) ListSystemBackup added in v1.4.0

func (btc *BackupTargetClient) ListSystemBackup() (systembackupstore.SystemBackups, error)

ListSystemBackup returns a list of system backups in backup target

func (*BackupTargetClient) LonghornEngineBinary added in v1.2.0

func (btc *BackupTargetClient) LonghornEngineBinary() string

func (*BackupTargetClient) UploadSystemBackup added in v1.4.0

func (btc *BackupTargetClient) UploadSystemBackup(name, localFile, longhornVersion, longhornGitCommit, managerImage, engineImage string) (string, error)

UploadSystemBackup uploads system backup to the backup target

type BackupVolume

type BackupVolume struct {
	Name                 string             `json:"name"`
	Size                 string             `json:"size"`
	Labels               map[string]string  `json:"labels"`
	Created              string             `json:"created"`
	LastBackupName       string             `json:"lastBackupName"`
	LastBackupAt         string             `json:"lastBackupAt"`
	DataStored           string             `json:"dataStored"`
	Messages             map[string]string  `json:"messages"`
	Backups              map[string]*Backup `json:"backups"`
	BackingImageName     string             `json:"backingImageName"`
	BackingImageChecksum string             `json:"backingImageChecksum"`
	StorageClassName     string             `json:"storageClassName"`
}

type ConfigMetadata added in v1.2.0

type ConfigMetadata struct {
	ModificationTime time.Time `json:"modificationTime"`
}

type Controller

type Controller struct {
	URL    string
	NodeID string
}

type DiskService added in v1.5.0

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

func NewDiskServiceClient added in v1.5.0

func NewDiskServiceClient(im *longhorn.InstanceManager, logger logrus.FieldLogger) (c *DiskService, err error)

func (*DiskService) Close added in v1.5.0

func (s *DiskService) Close()

func (*DiskService) DiskCreate added in v1.5.0

func (s *DiskService) DiskCreate(diskType, diskName, diskUUID, diskPath, diskDriver string, blockSize int64) (*imapi.DiskInfo, error)

func (*DiskService) DiskDelete added in v1.5.0

func (s *DiskService) DiskDelete(diskType, diskName, diskUUID, diskPath, diskDriver string) error

func (*DiskService) DiskGet added in v1.5.0

func (s *DiskService) DiskGet(diskType, diskName, diskPath, diskDriver string) (*imapi.DiskInfo, error)

func (*DiskService) DiskReplicaInstanceDelete added in v1.5.0

func (s *DiskService) DiskReplicaInstanceDelete(diskType, diskName, diskUUID, diskDriver, replciaInstanceName string) error

func (*DiskService) DiskReplicaInstanceList added in v1.5.0

func (s *DiskService) DiskReplicaInstanceList(diskType, diskName, diskDriver string) (map[string]*imapi.ReplicaStorageInstance, error)

func (*DiskService) GetInstanceManagerName added in v1.7.0

func (s *DiskService) GetInstanceManagerName() string

type EngineBinary added in v1.3.0

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

func GetEngineBinaryClient added in v1.4.0

func GetEngineBinaryClient(ds *datastore.DataStore, volumeName, nodeID string) (client *EngineBinary, err error)

func (*EngineBinary) BackupRestore added in v1.3.0

func (e *EngineBinary) BackupRestore(engine *longhorn.Engine, backupTarget, backupName, backupVolumeName,
	lastRestored string, credential map[string]string, concurrentLimit int) error

BackupRestore calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) BackupRestoreStatus added in v1.3.0

func (e *EngineBinary) BackupRestoreStatus(*longhorn.Engine) (map[string]*longhorn.RestoreStatus, error)

BackupRestoreStatus calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) CleanupBackupMountPoints added in v1.5.4

func (e *EngineBinary) CleanupBackupMountPoints() error

CleanupBackupMountPoints calls engine binary TODO: Deprecated, replaced by gRPC proxy, just to match the interface

func (*EngineBinary) Close added in v1.3.0

func (e *EngineBinary) Close()

Close engine proxy client connection. Do not panic this method because this is could be called by the fallback client.

func (*EngineBinary) ExecuteEngineBinary added in v1.3.0

func (e *EngineBinary) ExecuteEngineBinary(args ...string) (string, error)

func (*EngineBinary) ExecuteEngineBinaryWithTimeout added in v1.3.0

func (e *EngineBinary) ExecuteEngineBinaryWithTimeout(timeout time.Duration, args ...string) (string, error)

func (*EngineBinary) ExecuteEngineBinaryWithoutTimeout added in v1.3.0

func (e *EngineBinary) ExecuteEngineBinaryWithoutTimeout(envs []string, args ...string) (string, error)

func (*EngineBinary) LonghornEngineBinary added in v1.3.0

func (e *EngineBinary) LonghornEngineBinary() string

func (*EngineBinary) MetricsGet added in v1.4.0

func (e *EngineBinary) MetricsGet(*longhorn.Engine) (*Metrics, error)

func (*EngineBinary) Name added in v1.3.0

func (e *EngineBinary) Name() string

func (*EngineBinary) RemountReadOnlyVolume added in v1.5.4

func (e *EngineBinary) RemountReadOnlyVolume(*longhorn.Engine) error

func (*EngineBinary) ReplicaAdd added in v1.3.0

func (e *EngineBinary) ReplicaAdd(engine *longhorn.Engine, replicaName, url string, isRestoreVolume, fastSync bool, localSync *etypes.FileLocalSync, replicaFileSyncHTTPClientTimeout, grpcTimeoutSeconds int64) error

ReplicaAdd calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) ReplicaList added in v1.3.0

func (e *EngineBinary) ReplicaList(*longhorn.Engine) (map[string]*Replica, error)

ReplicaList calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) ReplicaModeUpdate added in v1.4.0

func (e *EngineBinary) ReplicaModeUpdate(engine *longhorn.Engine, url, mode string) error

ReplicaModeUpdate calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) ReplicaRebuildStatus added in v1.3.0

func (e *EngineBinary) ReplicaRebuildStatus(*longhorn.Engine) (map[string]*longhorn.RebuildStatus, error)

ReplicaRebuildStatus calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) ReplicaRebuildVerify added in v1.3.0

func (e *EngineBinary) ReplicaRebuildVerify(engine *longhorn.Engine, replicaName, url string) error

ReplicaRebuildVerify calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) ReplicaRemove added in v1.3.0

func (e *EngineBinary) ReplicaRemove(engine *longhorn.Engine, url string) error

ReplicaRemove calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) SnapshotBackup added in v1.3.0

func (e *EngineBinary) SnapshotBackup(engine *longhorn.Engine, snapName, backupName, backupTarget,
	backingImageName, backingImageChecksum, compressionMethod string, concurrentLimit int, storageClassName string,
	labels, credential, parameters map[string]string) (string, string, error)

SnapshotBackup calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) SnapshotBackupStatus added in v1.3.0

func (e *EngineBinary) SnapshotBackupStatus(engine *longhorn.Engine, backupName, replicaAddress,
	replicaName string) (*longhorn.EngineBackupStatus, error)

SnapshotBackupStatus calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) SnapshotClone added in v1.3.0

func (e *EngineBinary) SnapshotClone(engine *longhorn.Engine, snapshotName, fromEngineAddress, fromVolumeName,
	fromEngineName string, fileSyncHTTPClientTimeout, grpcTimeoutSeconds int64) error

SnapshotClone calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) SnapshotCloneStatus added in v1.3.0

func (e *EngineBinary) SnapshotCloneStatus(*longhorn.Engine) (map[string]*longhorn.SnapshotCloneStatus, error)

SnapshotCloneStatus calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) SnapshotCreate added in v1.3.0

func (e *EngineBinary) SnapshotCreate(engine *longhorn.Engine, name string, labels map[string]string,
	freezeFilesystem bool) (string, error)

SnapshotCreate calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) SnapshotDelete added in v1.3.0

func (e *EngineBinary) SnapshotDelete(engine *longhorn.Engine, name string) error

SnapshotDelete calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) SnapshotGet added in v1.3.0

func (e *EngineBinary) SnapshotGet(engine *longhorn.Engine, name string) (*longhorn.SnapshotInfo, error)

SnapshotGet calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) SnapshotHash added in v1.4.0

func (e *EngineBinary) SnapshotHash(engine *longhorn.Engine, snapshotName string, rehash bool) error

SnapshotHash calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) SnapshotHashStatus added in v1.4.0

func (e *EngineBinary) SnapshotHashStatus(engine *longhorn.Engine, snapshotName string) (map[string]*longhorn.HashStatus, error)

SnapshotHashStatus calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) SnapshotList added in v1.3.0

func (e *EngineBinary) SnapshotList(*longhorn.Engine) (map[string]*longhorn.SnapshotInfo, error)

SnapshotList calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) SnapshotPurge added in v1.3.0

func (e *EngineBinary) SnapshotPurge(*longhorn.Engine) error

SnapshotPurge calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) SnapshotPurgeStatus added in v1.3.0

func (e *EngineBinary) SnapshotPurgeStatus(*longhorn.Engine) (map[string]*longhorn.PurgeStatus, error)

SnapshotPurgeStatus calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) SnapshotRevert added in v1.3.0

func (e *EngineBinary) SnapshotRevert(engine *longhorn.Engine, name string) error

SnapshotRevert calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) VersionGet added in v1.3.0

func (e *EngineBinary) VersionGet(engine *longhorn.Engine, clientOnly bool) (*EngineVersion, error)

VersionGet calls engine binary to get client version and request gRPC proxy for server version.

func (*EngineBinary) VolumeExpand added in v1.3.0

func (e *EngineBinary) VolumeExpand(engine *longhorn.Engine) error

VolumeExpand calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) VolumeFrontendShutdown added in v1.3.0

func (e *EngineBinary) VolumeFrontendShutdown(*longhorn.Engine) error

VolumeFrontendShutdown calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) VolumeFrontendStart added in v1.3.0

func (e *EngineBinary) VolumeFrontendStart(engine *longhorn.Engine) error

VolumeFrontendStart calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) VolumeGet added in v1.3.0

func (e *EngineBinary) VolumeGet(*longhorn.Engine) (*Volume, error)

VolumeGet calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) VolumeSnapshotMaxCountSet added in v1.6.0

func (e *EngineBinary) VolumeSnapshotMaxCountSet(engine *longhorn.Engine) error

VolumeSnapshotMaxCountSet calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) VolumeSnapshotMaxSizeSet added in v1.6.0

func (e *EngineBinary) VolumeSnapshotMaxSizeSet(engine *longhorn.Engine) error

VolumeSnapshotMaxSizeSet calls engine binary TODO: Deprecated, replaced by gRPC proxy

func (*EngineBinary) VolumeUnmapMarkSnapChainRemovedSet added in v1.4.0

func (e *EngineBinary) VolumeUnmapMarkSnapChainRemovedSet(engine *longhorn.Engine) error

VolumeUnmapMarkSnapChainRemovedSet calls engine binary TODO: Deprecated, replaced by gRPC proxy

type EngineClient

type EngineClient interface {
	VersionGet(engine *longhorn.Engine, clientOnly bool) (*EngineVersion, error)

	VolumeGet(*longhorn.Engine) (*Volume, error)
	VolumeExpand(*longhorn.Engine) error

	VolumeFrontendStart(*longhorn.Engine) error
	VolumeFrontendShutdown(*longhorn.Engine) error
	VolumeUnmapMarkSnapChainRemovedSet(engine *longhorn.Engine) error
	VolumeSnapshotMaxCountSet(engine *longhorn.Engine) error
	VolumeSnapshotMaxSizeSet(engine *longhorn.Engine) error

	ReplicaList(*longhorn.Engine) (map[string]*Replica, error)
	ReplicaAdd(engine *longhorn.Engine, replicaName, url string, isRestoreVolume, fastSync bool, localSync *etypes.FileLocalSync, replicaFileSyncHTTPClientTimeout, grpcTimeoutSeconds int64) error
	ReplicaRemove(engine *longhorn.Engine, url string) error
	ReplicaRebuildStatus(*longhorn.Engine) (map[string]*longhorn.RebuildStatus, error)
	ReplicaRebuildVerify(engine *longhorn.Engine, replicaName, url string) error
	ReplicaModeUpdate(engine *longhorn.Engine, url string, mode string) error

	SnapshotCreate(engine *longhorn.Engine, name string, labels map[string]string, freezeFilesystem bool) (string, error)
	SnapshotList(engine *longhorn.Engine) (map[string]*longhorn.SnapshotInfo, error)
	SnapshotGet(engine *longhorn.Engine, name string) (*longhorn.SnapshotInfo, error)
	SnapshotDelete(engine *longhorn.Engine, name string) error
	SnapshotRevert(engine *longhorn.Engine, name string) error
	SnapshotPurge(engine *longhorn.Engine) error
	SnapshotPurgeStatus(engine *longhorn.Engine) (map[string]*longhorn.PurgeStatus, error)
	SnapshotBackup(engine *longhorn.Engine, snapshotName, backupName, backupTarget, backingImageName, backingImageChecksum, compressionMethod string, concurrentLimit int, storageClassName string, labels, credential, parameters map[string]string) (string, string, error)
	SnapshotBackupStatus(engine *longhorn.Engine, backupName, replicaAddress, replicaName string) (*longhorn.EngineBackupStatus, error)
	SnapshotCloneStatus(engine *longhorn.Engine) (map[string]*longhorn.SnapshotCloneStatus, error)
	SnapshotClone(engine *longhorn.Engine, snapshotName, fromEngineAddress, fromVolumeName, fromEngineName string, fileSyncHTTPClientTimeout, grpcTimeoutSeconds int64) error
	SnapshotHash(engine *longhorn.Engine, snapshotName string, rehash bool) error
	SnapshotHashStatus(engine *longhorn.Engine, snapshotName string) (map[string]*longhorn.HashStatus, error)

	BackupRestore(engine *longhorn.Engine, backupTarget, backupName, backupVolume, lastRestored string, credential map[string]string, concurrentLimit int) error
	BackupRestoreStatus(engine *longhorn.Engine) (map[string]*longhorn.RestoreStatus, error)

	CleanupBackupMountPoints() error

	MetricsGet(engine *longhorn.Engine) (*Metrics, error)
	RemountReadOnlyVolume(engine *longhorn.Engine) error
}

type EngineClientCollection

type EngineClientCollection interface {
	NewEngineClient(request *EngineClientRequest) (*EngineBinary, error)
}

type EngineClientProxy added in v1.3.0

type EngineClientProxy interface {
	EngineClient

	Close()
}

func GetCompatibleClient added in v1.3.0

func GetCompatibleClient(e *longhorn.Engine, fallBack interface{}, ds *datastore.DataStore, logger logrus.FieldLogger, proxyConnCounter util.Counter) (c EngineClientProxy, err error)

func NewEngineClientProxy added in v1.3.0

func NewEngineClientProxy(im *longhorn.InstanceManager, logger logrus.FieldLogger, proxyConnCounter util.Counter) (c EngineClientProxy, err error)

type EngineClientRequest

type EngineClientRequest struct {
	VolumeName   string
	EngineImage  string
	IP           string
	Port         int
	InstanceName string
}

type EngineCollection

type EngineCollection struct{}

func (*EngineCollection) NewEngineClient

func (c *EngineCollection) NewEngineClient(request *EngineClientRequest) (*EngineBinary, error)

type EngineInstanceCreateRequest added in v1.5.0

type EngineInstanceCreateRequest struct {
	Engine                           *longhorn.Engine
	VolumeFrontend                   longhorn.VolumeFrontend
	EngineReplicaTimeout             int64
	ReplicaFileSyncHTTPClientTimeout int64
	DataLocality                     longhorn.DataLocality
	ImIP                             string
	EngineCLIAPIVersion              int
	UpgradeRequired                  bool
	InitiatorAddress                 string
	TargetAddress                    string
}

type EngineInstanceUpgradeRequest added in v1.5.0

type EngineInstanceUpgradeRequest struct {
	Engine                           *longhorn.Engine
	VolumeFrontend                   longhorn.VolumeFrontend
	EngineReplicaTimeout             int64
	ReplicaFileSyncHTTPClientTimeout int64
	DataLocality                     longhorn.DataLocality
	EngineCLIAPIVersion              int
}

type EngineSimulator

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

func (*EngineSimulator) BackupRestore added in v0.6.0

func (e *EngineSimulator) BackupRestore(engine *longhorn.Engine, backupTarget, backupName, backupVolume, lastRestored string, credential map[string]string, concurrentLimit int) error

func (*EngineSimulator) BackupRestoreStatus added in v0.6.0

func (e *EngineSimulator) BackupRestoreStatus(*longhorn.Engine) (map[string]*longhorn.RestoreStatus, error)

func (*EngineSimulator) CleanupBackupMountPoints added in v1.5.4

func (e *EngineSimulator) CleanupBackupMountPoints() error

func (*EngineSimulator) IsGRPC added in v1.3.0

func (e *EngineSimulator) IsGRPC() bool

func (*EngineSimulator) MetricsGet added in v1.4.0

func (e *EngineSimulator) MetricsGet(*longhorn.Engine) (*Metrics, error)

func (*EngineSimulator) Name

func (e *EngineSimulator) Name() string

func (*EngineSimulator) RemountReadOnlyVolume added in v1.5.4

func (e *EngineSimulator) RemountReadOnlyVolume(*longhorn.Engine) error

func (*EngineSimulator) ReplicaAdd

func (e *EngineSimulator) ReplicaAdd(engine *longhorn.Engine, replicaName, url string, isRestoreVolume, fastSync bool, localSync *etypes.FileLocalSync, replicaFileSyncHTTPClientTimeout int64, grpcTimeoutSeconds int64) error

func (*EngineSimulator) ReplicaList

func (e *EngineSimulator) ReplicaList(*longhorn.Engine) (map[string]*Replica, error)

func (*EngineSimulator) ReplicaModeUpdate added in v1.4.0

func (e *EngineSimulator) ReplicaModeUpdate(engine *longhorn.Engine, url, mode string) error

func (*EngineSimulator) ReplicaRebuildStatus added in v0.8.0

func (e *EngineSimulator) ReplicaRebuildStatus(*longhorn.Engine) (map[string]*longhorn.RebuildStatus, error)

func (*EngineSimulator) ReplicaRebuildVerify added in v1.1.0

func (e *EngineSimulator) ReplicaRebuildVerify(engine *longhorn.Engine, replicaName, url string) error

func (*EngineSimulator) ReplicaRemove

func (e *EngineSimulator) ReplicaRemove(engine *longhorn.Engine, addr string) error

func (*EngineSimulator) SimulateStopReplica

func (e *EngineSimulator) SimulateStopReplica(addr string) error

func (*EngineSimulator) SnapshotBackup

func (e *EngineSimulator) SnapshotBackup(engine *longhorn.Engine, snapshotName, backupName, backupTarget,
	backingImageName, backingImageChecksum, compressionMethod string, concurrentLimit int, storageClassName string,
	labels, credential, parameters map[string]string) (string, string, error)

func (*EngineSimulator) SnapshotBackupStatus added in v0.6.0

func (e *EngineSimulator) SnapshotBackupStatus(engine *longhorn.Engine, backupName, replicaAddress,
	replicaName string) (*longhorn.EngineBackupStatus, error)

func (*EngineSimulator) SnapshotClone added in v1.2.0

func (e *EngineSimulator) SnapshotClone(engine *longhorn.Engine, snapshotName, fromEngineAddress, fromVolumeName,
	fromEngineName string, fileSyncHTTPClientTimeout, grpcTimeoutSeconds int64) error

func (*EngineSimulator) SnapshotCloneStatus added in v1.2.0

func (e *EngineSimulator) SnapshotCloneStatus(*longhorn.Engine) (map[string]*longhorn.SnapshotCloneStatus, error)

func (*EngineSimulator) SnapshotCreate

func (e *EngineSimulator) SnapshotCreate(engine *longhorn.Engine, name string, labels map[string]string,
	freezeFilesystem bool) (string, error)

func (*EngineSimulator) SnapshotDelete

func (e *EngineSimulator) SnapshotDelete(engine *longhorn.Engine, name string) error

func (*EngineSimulator) SnapshotGet

func (e *EngineSimulator) SnapshotGet(engine *longhorn.Engine, name string) (*longhorn.SnapshotInfo, error)

func (*EngineSimulator) SnapshotHash added in v1.4.0

func (e *EngineSimulator) SnapshotHash(engine *longhorn.Engine, snapshotName string, rehash bool) error

func (*EngineSimulator) SnapshotHashStatus added in v1.4.0

func (e *EngineSimulator) SnapshotHashStatus(engine *longhorn.Engine, snapshotName string) (map[string]*longhorn.HashStatus, error)

func (*EngineSimulator) SnapshotList

func (e *EngineSimulator) SnapshotList(engine *longhorn.Engine) (map[string]*longhorn.SnapshotInfo, error)

func (*EngineSimulator) SnapshotPurge

func (e *EngineSimulator) SnapshotPurge(*longhorn.Engine) error

func (*EngineSimulator) SnapshotPurgeStatus added in v0.6.0

func (e *EngineSimulator) SnapshotPurgeStatus(*longhorn.Engine) (map[string]*longhorn.PurgeStatus, error)

func (*EngineSimulator) SnapshotRevert

func (e *EngineSimulator) SnapshotRevert(engine *longhorn.Engine, name string) error

func (*EngineSimulator) Start added in v1.3.0

func (*EngineSimulator) Stop added in v1.3.0

func (*EngineSimulator) VersionGet added in v1.3.0

func (e *EngineSimulator) VersionGet(engine *longhorn.Engine, clientOnly bool) (*EngineVersion, error)

func (*EngineSimulator) VolumeExpand added in v1.3.0

func (e *EngineSimulator) VolumeExpand(*longhorn.Engine) error

func (*EngineSimulator) VolumeFrontendShutdown added in v1.3.0

func (e *EngineSimulator) VolumeFrontendShutdown(*longhorn.Engine) error

func (*EngineSimulator) VolumeFrontendStart added in v1.3.0

func (e *EngineSimulator) VolumeFrontendStart(*longhorn.Engine) error

func (*EngineSimulator) VolumeGet added in v1.3.0

func (e *EngineSimulator) VolumeGet(*longhorn.Engine) (*Volume, error)

func (*EngineSimulator) VolumeSnapshotMaxCountSet added in v1.6.0

func (e *EngineSimulator) VolumeSnapshotMaxCountSet(*longhorn.Engine) error

func (*EngineSimulator) VolumeSnapshotMaxSizeSet added in v1.6.0

func (e *EngineSimulator) VolumeSnapshotMaxSizeSet(*longhorn.Engine) error

func (*EngineSimulator) VolumeUnmapMarkSnapChainRemovedSet added in v1.4.0

func (e *EngineSimulator) VolumeUnmapMarkSnapChainRemovedSet(*longhorn.Engine) error

type EngineSimulatorCollection

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

func NewEngineSimulatorCollection

func NewEngineSimulatorCollection() *EngineSimulatorCollection

func (*EngineSimulatorCollection) CreateEngineSimulator

func (c *EngineSimulatorCollection) CreateEngineSimulator(request *EngineSimulatorRequest) error

func (*EngineSimulatorCollection) DeleteEngineSimulator

func (c *EngineSimulatorCollection) DeleteEngineSimulator(volumeName string) error

func (*EngineSimulatorCollection) GetEngineSimulator

func (c *EngineSimulatorCollection) GetEngineSimulator(volumeName string) (*EngineSimulator, error)

func (*EngineSimulatorCollection) NewEngineClient

func (c *EngineSimulatorCollection) NewEngineClient(request *EngineClientRequest) (EngineClient, error)

type EngineSimulatorRequest

type EngineSimulatorRequest struct {
	VolumeName     string
	VolumeSize     int64
	ControllerAddr string
	ReplicaAddrs   []string
}

type EngineVersion

type EngineVersion struct {
	ClientVersion *longhorn.EngineVersionDetails `json:"clientVersion"`
	ServerVersion *longhorn.EngineVersionDetails `json:"serverVersion"`
}

type InstanceManagerClient added in v0.8.0

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

func NewInstanceManagerClient added in v0.8.0

func NewInstanceManagerClient(im *longhorn.InstanceManager) (*InstanceManagerClient, error)

NewInstanceManagerClient creates a new instance manager client

func (*InstanceManagerClient) Close added in v1.3.0

func (c *InstanceManagerClient) Close() error

func (*InstanceManagerClient) EngineInstanceCreate added in v1.5.0

EngineInstanceCreate creates a new engine instance

func (*InstanceManagerClient) EngineInstanceUpgrade added in v1.5.0

EngineInstanceUpgrade upgrades the engine process

func (*InstanceManagerClient) GetAPIVersion added in v1.5.0

func (c *InstanceManagerClient) GetAPIVersion() int

func (*InstanceManagerClient) InstanceDelete added in v1.5.0

func (c *InstanceManagerClient) InstanceDelete(dataEngine longhorn.DataEngineType, name, kind, diskUUID string, cleanupRequired bool) (err error)

InstanceDelete deletes the instance

func (*InstanceManagerClient) InstanceGet added in v1.5.0

func (c *InstanceManagerClient) InstanceGet(dataEngine longhorn.DataEngineType, name, kind string) (*longhorn.InstanceProcess, error)

InstanceGet returns the instance process

func (*InstanceManagerClient) InstanceGetBinary added in v1.5.0

func (c *InstanceManagerClient) InstanceGetBinary(dataEngine longhorn.DataEngineType, name, kind, diskUUID string) (string, error)

InstanceGetBinary returns the binary name of the instance

func (*InstanceManagerClient) InstanceList added in v1.5.0

func (c *InstanceManagerClient) InstanceList() (map[string]longhorn.InstanceProcess, error)

InstanceList returns a map of instance name to instance process

func (*InstanceManagerClient) InstanceLog added in v1.5.0

func (c *InstanceManagerClient) InstanceLog(ctx context.Context, dataEngine longhorn.DataEngineType, name, kind string) (*imapi.LogStream, error)

InstanceLog returns a grpc stream that will be closed when the passed context is cancelled or the underlying grpc client is closed

func (*InstanceManagerClient) InstanceWatch added in v1.5.0

func (c *InstanceManagerClient) InstanceWatch(ctx context.Context) (interface{}, error)

InstanceWatch returns a grpc stream that will be closed when the passed context is cancelled or the underlying grpc client is closed

func (*InstanceManagerClient) LogSetFlags added in v1.7.0

func (c *InstanceManagerClient) LogSetFlags(dataEngine longhorn.DataEngineType, component, flags string) error

func (*InstanceManagerClient) LogSetLevel added in v1.7.0

func (c *InstanceManagerClient) LogSetLevel(dataEngine longhorn.DataEngineType, component, level string) error

func (*InstanceManagerClient) ReplicaInstanceCreate added in v1.5.0

ReplicaInstanceCreate creates a new replica instance

func (*InstanceManagerClient) VersionGet added in v0.8.0

func (c *InstanceManagerClient) VersionGet() (int, int, int, int, error)

VersionGet returns the version of the instance manager

type LauncherVolumeInfo

type LauncherVolumeInfo struct {
	Volume   string `json:"volume,omitempty"`
	Frontend string `json:"frontend,omitempty"`
	Endpoint string `json:"endpoint,omitempty"`
}

type Metrics added in v1.4.0

type Metrics struct {
	ReadThroughput  uint64
	WriteThroughput uint64
	ReadLatency     uint64
	WriteLatency    uint64
	ReadIOPS        uint64
	WriteIOPS       uint64
}

type Proxy added in v1.3.0

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

func (*Proxy) BackupRestore added in v1.3.0

func (p *Proxy) BackupRestore(e *longhorn.Engine, backupTarget, backupName, backupVolumeName, lastRestored string,
	credential map[string]string, concurrentLimit int) error

func (*Proxy) BackupRestoreStatus added in v1.3.0

func (p *Proxy) BackupRestoreStatus(e *longhorn.Engine) (status map[string]*longhorn.RestoreStatus, err error)

func (*Proxy) CleanupBackupMountPoints added in v1.5.4

func (p *Proxy) CleanupBackupMountPoints() (err error)

func (*Proxy) Close added in v1.3.0

func (p *Proxy) Close()

func (*Proxy) DirectToURL added in v1.3.0

func (p *Proxy) DirectToURL(e *longhorn.Engine) string

func (*Proxy) MetricsGet added in v1.4.0

func (p *Proxy) MetricsGet(e *longhorn.Engine) (*Metrics, error)

func (*Proxy) RemountReadOnlyVolume added in v1.5.4

func (p *Proxy) RemountReadOnlyVolume(e *longhorn.Engine) error

func (*Proxy) ReplicaAdd added in v1.3.0

func (p *Proxy) ReplicaAdd(e *longhorn.Engine, replicaName, replicaAddress string, restore, fastSync bool, localSync *etypes.FileLocalSync, replicaFileSyncHTTPClientTimeout, grpcTimeoutSeconds int64) (err error)

func (*Proxy) ReplicaList added in v1.3.0

func (p *Proxy) ReplicaList(e *longhorn.Engine) (replicas map[string]*Replica, err error)

func (*Proxy) ReplicaModeUpdate added in v1.4.0

func (p *Proxy) ReplicaModeUpdate(e *longhorn.Engine, url, mode string) (err error)

func (*Proxy) ReplicaRebuildStatus added in v1.3.0

func (p *Proxy) ReplicaRebuildStatus(e *longhorn.Engine) (status map[string]*longhorn.RebuildStatus, err error)

func (*Proxy) ReplicaRebuildVerify added in v1.3.0

func (p *Proxy) ReplicaRebuildVerify(e *longhorn.Engine, replicaName, url string) (err error)

func (*Proxy) ReplicaRemove added in v1.3.0

func (p *Proxy) ReplicaRemove(e *longhorn.Engine, address string) (err error)

func (*Proxy) SnapshotBackup added in v1.3.0

func (p *Proxy) SnapshotBackup(e *longhorn.Engine, snapshotName, backupName, backupTarget,
	backingImageName, backingImageChecksum, compressionMethod string, concurrentLimit int, storageClassName string,
	labels, credential, parameters map[string]string) (string, string, error)

func (*Proxy) SnapshotBackupStatus added in v1.3.0

func (p *Proxy) SnapshotBackupStatus(e *longhorn.Engine, backupName, replicaAddress,
	replicaName string) (status *longhorn.EngineBackupStatus, err error)

func (*Proxy) SnapshotClone added in v1.3.0

func (p *Proxy) SnapshotClone(e *longhorn.Engine, snapshotName, fromEngineAddress, fromVolumeName, fromEngineName string,
	fileSyncHTTPClientTimeout, grpcTimeoutSeconds int64) (err error)

func (*Proxy) SnapshotCloneStatus added in v1.3.0

func (p *Proxy) SnapshotCloneStatus(e *longhorn.Engine) (status map[string]*longhorn.SnapshotCloneStatus, err error)

func (*Proxy) SnapshotCreate added in v1.3.0

func (p *Proxy) SnapshotCreate(e *longhorn.Engine, name string, labels map[string]string,
	freezeFilesystem bool) (string, error)

func (*Proxy) SnapshotDelete added in v1.3.0

func (p *Proxy) SnapshotDelete(e *longhorn.Engine, name string) (err error)

func (*Proxy) SnapshotGet added in v1.3.0

func (p *Proxy) SnapshotGet(e *longhorn.Engine, name string) (snapshot *longhorn.SnapshotInfo, err error)

func (*Proxy) SnapshotHash added in v1.4.0

func (p *Proxy) SnapshotHash(e *longhorn.Engine, snapshotName string, rehash bool) error

func (*Proxy) SnapshotHashStatus added in v1.4.0

func (p *Proxy) SnapshotHashStatus(e *longhorn.Engine, snapshotName string) (status map[string]*longhorn.HashStatus, err error)

func (*Proxy) SnapshotList added in v1.3.0

func (p *Proxy) SnapshotList(e *longhorn.Engine) (snapshots map[string]*longhorn.SnapshotInfo, err error)

func (*Proxy) SnapshotPurge added in v1.3.0

func (p *Proxy) SnapshotPurge(e *longhorn.Engine) (err error)

func (*Proxy) SnapshotPurgeStatus added in v1.3.0

func (p *Proxy) SnapshotPurgeStatus(e *longhorn.Engine) (status map[string]*longhorn.PurgeStatus, err error)

func (*Proxy) SnapshotRevert added in v1.3.0

func (p *Proxy) SnapshotRevert(e *longhorn.Engine, snapshotName string) (err error)

func (*Proxy) VersionGet added in v1.3.0

func (p *Proxy) VersionGet(e *longhorn.Engine, clientOnly bool) (version *EngineVersion, err error)

func (*Proxy) VolumeExpand added in v1.3.0

func (p *Proxy) VolumeExpand(e *longhorn.Engine) (err error)

func (*Proxy) VolumeFrontendShutdown added in v1.3.0

func (p *Proxy) VolumeFrontendShutdown(e *longhorn.Engine) (err error)

func (*Proxy) VolumeFrontendStart added in v1.3.0

func (p *Proxy) VolumeFrontendStart(e *longhorn.Engine) (err error)

func (*Proxy) VolumeGet added in v1.3.0

func (p *Proxy) VolumeGet(e *longhorn.Engine) (volume *Volume, err error)

func (*Proxy) VolumeSnapshotMaxCountSet added in v1.6.0

func (p *Proxy) VolumeSnapshotMaxCountSet(e *longhorn.Engine) error

func (*Proxy) VolumeSnapshotMaxSizeSet added in v1.6.0

func (p *Proxy) VolumeSnapshotMaxSizeSet(e *longhorn.Engine) error

func (*Proxy) VolumeUnmapMarkSnapChainRemovedSet added in v1.4.0

func (p *Proxy) VolumeUnmapMarkSnapChainRemovedSet(e *longhorn.Engine) error

type Replica

type Replica struct {
	URL  string
	Mode longhorn.ReplicaMode
}

type ReplicaError added in v1.0.1

type ReplicaError struct {
	Address string
	Message string
}

func (ReplicaError) Error added in v1.0.1

func (e ReplicaError) Error() string

type ReplicaInstanceCreateRequest added in v1.5.0

type ReplicaInstanceCreateRequest struct {
	Replica             *longhorn.Replica
	DiskName            string
	DataPath            string
	BackingImagePath    string
	DataLocality        longhorn.DataLocality
	ImIP                string
	EngineCLIAPIVersion int
}

type ShareManagerClient added in v1.4.4

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

func NewShareManagerClient added in v1.4.4

func NewShareManagerClient(sm *longhorn.ShareManager, pod *corev1.Pod) (*ShareManagerClient, error)

func (*ShareManagerClient) Close added in v1.4.4

func (c *ShareManagerClient) Close() error

func (*ShareManagerClient) FilesystemTrim added in v1.4.4

func (c *ShareManagerClient) FilesystemTrim(encryptedDevice bool) error

func (*ShareManagerClient) Mount added in v1.5.3

func (c *ShareManagerClient) Mount() error

func (*ShareManagerClient) Unmount added in v1.4.4

func (c *ShareManagerClient) Unmount() error

type SystemBackupOperationInterface added in v1.4.0

type SystemBackupOperationInterface interface {
	DeleteSystemBackup(systemBackup *longhorn.SystemBackup) (string, error)
	DownloadSystemBackup(name, version, downloadPath string) error
	GetSystemBackupConfig(name, version string) (*systembackupstore.Config, error)
	ListSystemBackup() (systembackupstore.SystemBackups, error)
	UploadSystemBackup(name, localFile, longhornVersion, longhornGitCommit, managerImage, engineImage string) (string, error)
}

type TaskError added in v1.0.1

type TaskError struct {
	ReplicaErrors []ReplicaError
}

func (TaskError) Error added in v1.0.1

func (e TaskError) Error() string

type Volume

type Volume struct {
	Name                      string `json:"name"`
	Size                      int64  `json:"size"`
	ReplicaCount              int    `json:"replicaCount"`
	Endpoint                  string `json:"endpoint"`
	Frontend                  string `json:"frontend"`
	FrontendState             string `json:"frontendState"`
	IsExpanding               bool   `json:"isExpanding"`
	LastExpansionError        string `json:"lastExpansionError"`
	LastExpansionFailedAt     string `json:"lastExpansionFailedAt"`
	UnmapMarkSnapChainRemoved bool   `json:"unmapMarkSnapChainRemoved"`
	SnapshotMaxCount          int    `json:"snapshotMaxCount"`
	SnapshotMaxSize           int64  `json:"SnapshotMaxSize"`
}

Jump to

Keyboard shortcuts

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