Documentation ¶
Index ¶
- Constants
- func CheckCLICompatibilty(cliVersion, cliMinVersion int) error
- func CheckInstanceManagerCompatibilty(imMinVersion, imVersion int) error
- func GetAddressFromBackendReplicaURL(url string) string
- func GetBackendReplicaURL(address string) string
- func GetBackupURL(backupTarget, backupName, volName string) string
- func GetDeprecatedInstanceManagerBinary(image string) string
- func GetEngineProcessFrontend(volumeFrontend types.VolumeFrontend) (string, error)
- func ValidateReplicaURL(url string) error
- type Backup
- type BackupCreateInfo
- type BackupTarget
- func (b *BackupTarget) DeleteBackup(backupURL string) error
- func (b *BackupTarget) DeleteVolume(volumeName string) error
- func (b *BackupTarget) ExecuteEngineBinary(args ...string) (string, error)
- func (b *BackupTarget) ExecuteEngineBinaryWithoutTimeout(args ...string) (string, error)
- func (b *BackupTarget) GetBackup(backupURL string) (*Backup, error)
- func (b *BackupTarget) GetVolume(volumeName string) (*BackupVolume, error)
- func (b *BackupTarget) List(volumeName string) ([]*Backup, error)
- func (b *BackupTarget) ListVolumes() (map[string]*BackupVolume, error)
- func (b *BackupTarget) LonghornEngineBinary() string
- type BackupVolume
- type Controller
- type Engine
- func (e *Engine) BackupRestore(backupTarget, backupName, backupVolume, lastRestored string, ...) error
- func (e *Engine) BackupRestoreStatus() (map[string]*types.RestoreStatus, error)
- func (e *Engine) Endpoint() (string, error)
- func (e *Engine) ExecuteEngineBinary(args ...string) (string, error)
- func (e *Engine) ExecuteEngineBinaryWithTimeout(timeout time.Duration, args ...string) (string, error)
- func (e *Engine) ExecuteEngineBinaryWithoutTimeout(args ...string) (string, error)
- func (e *Engine) Expand(size int64) error
- func (e *Engine) Info() (*Volume, error)
- func (e *Engine) LonghornEngineBinary() string
- func (e *Engine) Name() string
- func (e *Engine) ReplicaAdd(url string) error
- func (e *Engine) ReplicaList() (map[string]*Replica, error)
- func (e *Engine) ReplicaRebuildStatus() (map[string]*types.RebuildStatus, error)
- func (e *Engine) ReplicaRemove(url string) error
- func (e *Engine) SnapshotBackup(snapName, backupTarget string, labels map[string]string, ...) (string, error)
- func (e *Engine) SnapshotBackupStatus() (map[string]*types.BackupStatus, error)
- func (e *Engine) SnapshotCreate(name string, labels map[string]string) (string, error)
- func (e *Engine) SnapshotDelete(name string) error
- func (e *Engine) SnapshotGet(name string) (*Snapshot, error)
- func (e *Engine) SnapshotList() (map[string]*Snapshot, error)
- func (e *Engine) SnapshotPurge() error
- func (e *Engine) SnapshotPurgeStatus() (map[string]*types.PurgeStatus, error)
- func (e *Engine) SnapshotRevert(name string) error
- func (e *Engine) Version(clientOnly bool) (*EngineVersion, error)
- type EngineClient
- type EngineClientCollection
- type EngineClientRequest
- type EngineCollection
- type EngineSimulator
- func (e *EngineSimulator) BackupRestore(backupTarget, backupName, backupVolume, lastRestored string, ...) error
- func (e *EngineSimulator) BackupRestoreStatus() (map[string]*types.RestoreStatus, error)
- func (e *EngineSimulator) Endpoint() (string, error)
- func (e *EngineSimulator) Expand(size int64) error
- func (e *EngineSimulator) Info() (*Volume, error)
- func (e *EngineSimulator) Name() string
- func (e *EngineSimulator) ReplicaAdd(url string) error
- func (e *EngineSimulator) ReplicaList() (map[string]*Replica, error)
- func (e *EngineSimulator) ReplicaRebuildStatus() (map[string]*types.RebuildStatus, error)
- func (e *EngineSimulator) ReplicaRemove(addr string) error
- func (e *EngineSimulator) SimulateStopReplica(addr string) error
- func (e *EngineSimulator) SnapshotBackup(snapName, backupTarget string, labels map[string]string, ...) (string, error)
- func (e *EngineSimulator) SnapshotBackupStatus() (map[string]*types.BackupStatus, error)
- func (e *EngineSimulator) SnapshotCreate(name string, labels map[string]string) (string, error)
- func (e *EngineSimulator) SnapshotDelete(name string) error
- func (e *EngineSimulator) SnapshotGet(name string) (*Snapshot, error)
- func (e *EngineSimulator) SnapshotList() (map[string]*Snapshot, error)
- func (e *EngineSimulator) SnapshotPurge() error
- func (e *EngineSimulator) SnapshotPurgeStatus() (map[string]*types.PurgeStatus, error)
- func (e *EngineSimulator) SnapshotRevert(name string) error
- func (e *EngineSimulator) Version(clientOnly bool) (*EngineVersion, error)
- type EngineSimulatorCollection
- func (c *EngineSimulatorCollection) CreateEngineSimulator(request *EngineSimulatorRequest) error
- func (c *EngineSimulatorCollection) DeleteEngineSimulator(volumeName string) error
- func (c *EngineSimulatorCollection) GetEngineSimulator(volumeName string) (*EngineSimulator, error)
- func (c *EngineSimulatorCollection) NewEngineClient(request *EngineClientRequest) (EngineClient, error)
- type EngineSimulatorRequest
- type EngineVersion
- type InstanceManagerClient
- func (c *InstanceManagerClient) EngineProcessCreate(engineName, volumeName, engineImage string, ...) (*types.InstanceProcess, error)
- func (c *InstanceManagerClient) EngineProcessUpgrade(engineName, volumeName, engineImage string, ...) (*types.InstanceProcess, error)
- func (c *InstanceManagerClient) ProcessDelete(name string) error
- func (c *InstanceManagerClient) ProcessGet(name string) (*types.InstanceProcess, error)
- func (c *InstanceManagerClient) ProcessList() (map[string]types.InstanceProcess, error)
- func (c *InstanceManagerClient) ProcessLog(name string) (*imapi.LogStream, error)
- func (c *InstanceManagerClient) ProcessWatch() (*imapi.ProcessStream, error)
- func (c *InstanceManagerClient) ReplicaProcessCreate(replicaName, engineImage, dataPath string, size int64) (*types.InstanceProcess, error)
- func (c *InstanceManagerClient) VersionGet() (int, int, error)
- type LauncherVolumeInfo
- type Replica
- type Snapshot
- type Volume
Constants ¶
View Source
const ( CurrentInstanceManagerAPIVersion = 1 UnknownInstanceManagerAPIVersion = 0 DefaultEnginePortCount = 1 DefaultReplicaPortCount = 15 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 ( // CurrentCLIVersion indicates the API version manager used to talk with the // engine, including `longhorn-engine` and `longhorn-instance-manager` CurrentCLIVersion = 3 InstanceManagerDefaultPort = 8500 DefaultISCSIPort = "3260" DefaultISCSILUN = "1" BackupStateComplete = "complete" BackupStateError = "error" BackupStateInProgress = "in_progress" )
View Source
const (
VolumeHeadName = "volume-head"
)
Variables ¶
This section is empty.
Functions ¶
func CheckCLICompatibilty ¶
func CheckInstanceManagerCompatibilty ¶ added in v0.8.0
func GetAddressFromBackendReplicaURL ¶ added in v0.6.0
func GetBackendReplicaURL ¶ added in v0.6.0
func GetBackupURL ¶
func GetDeprecatedInstanceManagerBinary ¶ added in v0.8.0
func GetEngineProcessFrontend ¶ added in v0.8.0
func GetEngineProcessFrontend(volumeFrontend types.VolumeFrontend) (string, error)
func ValidateReplicaURL ¶
Types ¶
type Backup ¶
type Backup struct { Name string `json:"name"` 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"` }
type BackupCreateInfo ¶ added in v0.6.0
type BackupTarget ¶
func NewBackupTarget ¶
func NewBackupTarget(backupTarget, engineImage string, credential map[string]string) *BackupTarget
func (*BackupTarget) DeleteBackup ¶
func (b *BackupTarget) DeleteBackup(backupURL string) error
func (*BackupTarget) DeleteVolume ¶ added in v0.6.0
func (b *BackupTarget) DeleteVolume(volumeName string) error
func (*BackupTarget) ExecuteEngineBinary ¶
func (b *BackupTarget) ExecuteEngineBinary(args ...string) (string, error)
func (*BackupTarget) ExecuteEngineBinaryWithoutTimeout ¶ added in v0.6.0
func (b *BackupTarget) ExecuteEngineBinaryWithoutTimeout(args ...string) (string, error)
func (*BackupTarget) GetBackup ¶
func (b *BackupTarget) GetBackup(backupURL string) (*Backup, error)
func (*BackupTarget) GetVolume ¶
func (b *BackupTarget) GetVolume(volumeName string) (*BackupVolume, error)
func (*BackupTarget) ListVolumes ¶
func (b *BackupTarget) ListVolumes() (map[string]*BackupVolume, error)
func (*BackupTarget) LonghornEngineBinary ¶
func (b *BackupTarget) LonghornEngineBinary() string
type BackupVolume ¶
type BackupVolume struct { Name string `json:"name"` Size string `json:"size"` Created string `json:"created"` LastBackupName string `json:"lastBackupName"` LastBackupAt string `json:"lastBackupAt"` DataStored string `json:"dataStored"` Messages map[backupstore.MessageType]string `json:"messages"` Backups map[string]*Backup `json:"backups"` BaseImage string `json:"baseImage"` }
type Controller ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) BackupRestore ¶
func (*Engine) BackupRestoreStatus ¶ added in v0.6.0
func (e *Engine) BackupRestoreStatus() (map[string]*types.RestoreStatus, error)
func (*Engine) ExecuteEngineBinary ¶
func (*Engine) ExecuteEngineBinaryWithTimeout ¶
func (*Engine) ExecuteEngineBinaryWithoutTimeout ¶ added in v0.6.0
func (*Engine) LonghornEngineBinary ¶
func (*Engine) ReplicaAdd ¶
func (*Engine) ReplicaRebuildStatus ¶ added in v0.8.0
func (e *Engine) ReplicaRebuildStatus() (map[string]*types.RebuildStatus, error)
func (*Engine) ReplicaRemove ¶
func (*Engine) SnapshotBackup ¶
func (*Engine) SnapshotBackupStatus ¶ added in v0.6.0
func (e *Engine) SnapshotBackupStatus() (map[string]*types.BackupStatus, error)
func (*Engine) SnapshotCreate ¶
func (*Engine) SnapshotDelete ¶
func (*Engine) SnapshotPurge ¶
func (*Engine) SnapshotPurgeStatus ¶ added in v0.6.0
func (e *Engine) SnapshotPurgeStatus() (map[string]*types.PurgeStatus, error)
func (*Engine) SnapshotRevert ¶
type EngineClient ¶
type EngineClient interface { Name() string Version(clientOnly bool) (*EngineVersion, error) Info() (*Volume, error) Endpoint() (string, error) Expand(size int64) error ReplicaList() (map[string]*Replica, error) ReplicaAdd(url string) error ReplicaRemove(url string) error ReplicaRebuildStatus() (map[string]*types.RebuildStatus, error) SnapshotCreate(name string, labels map[string]string) (string, error) SnapshotList() (map[string]*Snapshot, error) SnapshotGet(name string) (*Snapshot, error) SnapshotDelete(name string) error SnapshotRevert(name string) error SnapshotPurge() error SnapshotPurgeStatus() (map[string]*types.PurgeStatus, error) SnapshotBackup(snapName, backupTarget string, labels map[string]string, credential map[string]string) (string, error) SnapshotBackupStatus() (map[string]*types.BackupStatus, error) BackupRestore(backupTarget, backupName, backupVolume, lastRestored string, credential map[string]string) error BackupRestoreStatus() (map[string]*types.RestoreStatus, error) }
type EngineClientCollection ¶
type EngineClientCollection interface {
NewEngineClient(request *EngineClientRequest) (EngineClient, error)
}
type EngineClientRequest ¶
type EngineCollection ¶
type EngineCollection struct{}
func (*EngineCollection) NewEngineClient ¶
func (c *EngineCollection) NewEngineClient(request *EngineClientRequest) (EngineClient, error)
type EngineSimulator ¶
type EngineSimulator struct {
// contains filtered or unexported fields
}
func (*EngineSimulator) BackupRestore ¶ added in v0.6.0
func (e *EngineSimulator) BackupRestore(backupTarget, backupName, backupVolume, lastRestored string, credential map[string]string) error
func (*EngineSimulator) BackupRestoreStatus ¶ added in v0.6.0
func (e *EngineSimulator) BackupRestoreStatus() (map[string]*types.RestoreStatus, error)
func (*EngineSimulator) Endpoint ¶
func (e *EngineSimulator) Endpoint() (string, error)
func (*EngineSimulator) Expand ¶ added in v0.8.0
func (e *EngineSimulator) Expand(size int64) error
func (*EngineSimulator) Info ¶ added in v0.5.0
func (e *EngineSimulator) Info() (*Volume, error)
func (*EngineSimulator) Name ¶
func (e *EngineSimulator) Name() string
func (*EngineSimulator) ReplicaAdd ¶
func (e *EngineSimulator) ReplicaAdd(url string) error
func (*EngineSimulator) ReplicaList ¶
func (e *EngineSimulator) ReplicaList() (map[string]*Replica, error)
func (*EngineSimulator) ReplicaRebuildStatus ¶ added in v0.8.0
func (e *EngineSimulator) ReplicaRebuildStatus() (map[string]*types.RebuildStatus, error)
func (*EngineSimulator) ReplicaRemove ¶
func (e *EngineSimulator) ReplicaRemove(addr string) error
func (*EngineSimulator) SimulateStopReplica ¶
func (e *EngineSimulator) SimulateStopReplica(addr string) error
func (*EngineSimulator) SnapshotBackup ¶
func (*EngineSimulator) SnapshotBackupStatus ¶ added in v0.6.0
func (e *EngineSimulator) SnapshotBackupStatus() (map[string]*types.BackupStatus, error)
func (*EngineSimulator) SnapshotCreate ¶
func (*EngineSimulator) SnapshotDelete ¶
func (e *EngineSimulator) SnapshotDelete(name string) error
func (*EngineSimulator) SnapshotGet ¶
func (e *EngineSimulator) SnapshotGet(name string) (*Snapshot, error)
func (*EngineSimulator) SnapshotList ¶
func (e *EngineSimulator) SnapshotList() (map[string]*Snapshot, error)
func (*EngineSimulator) SnapshotPurge ¶
func (e *EngineSimulator) SnapshotPurge() error
func (*EngineSimulator) SnapshotPurgeStatus ¶ added in v0.6.0
func (e *EngineSimulator) SnapshotPurgeStatus() (map[string]*types.PurgeStatus, error)
func (*EngineSimulator) SnapshotRevert ¶
func (e *EngineSimulator) SnapshotRevert(name string) error
func (*EngineSimulator) Version ¶
func (e *EngineSimulator) Version(clientOnly bool) (*EngineVersion, 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 EngineVersion ¶
type EngineVersion struct { ClientVersion *types.EngineVersionDetails `json:"clientVersion"` ServerVersion *types.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)
func (*InstanceManagerClient) EngineProcessCreate ¶ added in v0.8.0
func (c *InstanceManagerClient) EngineProcessCreate(engineName, volumeName, engineImage string, volumeFrontend types.VolumeFrontend, replicaAddressMap map[string]string) (*types.InstanceProcess, error)
func (*InstanceManagerClient) EngineProcessUpgrade ¶ added in v0.8.0
func (c *InstanceManagerClient) EngineProcessUpgrade(engineName, volumeName, engineImage string, volumeFrontend types.VolumeFrontend, replicaAddressMap map[string]string) (*types.InstanceProcess, error)
func (*InstanceManagerClient) ProcessDelete ¶ added in v0.8.0
func (c *InstanceManagerClient) ProcessDelete(name string) error
func (*InstanceManagerClient) ProcessGet ¶ added in v0.8.0
func (c *InstanceManagerClient) ProcessGet(name string) (*types.InstanceProcess, error)
func (*InstanceManagerClient) ProcessList ¶ added in v0.8.0
func (c *InstanceManagerClient) ProcessList() (map[string]types.InstanceProcess, error)
func (*InstanceManagerClient) ProcessLog ¶ added in v0.8.0
func (c *InstanceManagerClient) ProcessLog(name string) (*imapi.LogStream, error)
func (*InstanceManagerClient) ProcessWatch ¶ added in v0.8.0
func (c *InstanceManagerClient) ProcessWatch() (*imapi.ProcessStream, error)
func (*InstanceManagerClient) ReplicaProcessCreate ¶ added in v0.8.0
func (c *InstanceManagerClient) ReplicaProcessCreate(replicaName, engineImage, dataPath string, size int64) (*types.InstanceProcess, error)
func (*InstanceManagerClient) VersionGet ¶ added in v0.8.0
func (c *InstanceManagerClient) VersionGet() (int, int, error)
type LauncherVolumeInfo ¶
type Replica ¶
type Replica struct { URL string Mode types.ReplicaMode }
Click to show internal directories.
Click to hide internal directories.