Versions in this module Expand all Collapse all v6 v6.1.0 May 4, 2024 Changes in this version + const PoolIDTemporary + var ErrBackupSnapshotsMismatch = fmt.Errorf("Backup snapshots mismatch") + var ErrNilValue = fmt.Errorf("Nil value provided") + func BucketDBCreate(ctx context.Context, pool Pool, projectName string, memberSpecific bool, ...) (int64, error) + func BucketDBDelete(ctx context.Context, pool Pool, bucketID int64) error + func BucketDBGet(pool Pool, projectName string, bucketName string, memberSpecific bool) (*db.StorageBucket, error) + func BucketKeysDBGet(pool Pool, bucketID int64) ([]*db.StorageBucketKey, error) + func CompareSnapshots(sourceSnapshots []ComparableSnapshot, targetSnapshots []ComparableSnapshot) ([]int, []int) + func ConfigDiff(oldConfig map[string]string, newConfig map[string]string) ([]string, bool) + func CreateContainerMountpoint(mountPoint string, mountPointSymlink string, privileged bool) error + func CreateSnapshotMountpoint(snapshotMountpoint string, snapshotsSymlinkTarget string, ...) error + func FallbackMigrationType(contentType drivers.ContentType) migration.MigrationFSType + func GetImageMountPoint(poolName string, fingerprint string) string + func GetSnapshotMountPoint(projectName, poolName string, snapshotName string) string + func GetStoragePoolMountPoint(poolName string) string + func GetStoragePoolVolumeSnapshotMountPoint(poolName string, snapshotName string) string + func ImageUnpack(imageFile string, vol drivers.Volume, destBlockFile string, sysOS *sys.OS, ...) (int64, error) + func InstanceContentType(inst instance.Instance) drivers.ContentType + func InstanceDiskBlockSize(pool Pool, inst instance.Instance, op *operations.Operation) (int64, error) + func InstanceImportingFilePath(instanceType instancetype.Type, poolName, projectName, instanceName string) string + func InstancePath(instanceType instancetype.Type, projectName, instanceName string, ...) string + func InstanceTypeToVolumeType(instType instancetype.Type) (drivers.VolumeType, error) + func InstanceUnmount(pool Pool, inst instance.Instance, op *operations.Operation) error + func IsAvailable(poolName string) bool + func Patch(s *state.State, patchName string) error + func RenderSnapshotUsage(s *state.State, snapInst instance.Instance) func(response any) error + func UsedBy(ctx context.Context, s *state.State, pool Pool, firstOnly bool, ...) ([]string, error) + func VolumeContentTypeNameToContentType(contentTypeName string) (int, error) + func VolumeContentTypeToDBContentType(contentType drivers.ContentType) (int, error) + func VolumeDBContentTypeToContentType(volDBType int) (drivers.ContentType, error) + func VolumeDBCreate(pool Pool, projectName string, volumeName string, volumeDescription string, ...) error + func VolumeDBDelete(pool Pool, projectName string, volumeName string, ...) error + func VolumeDBGet(pool Pool, projectName string, volumeName string, ...) (*db.StorageVolume, error) + func VolumeDBSnapshotsGet(pool Pool, projectName string, volume string, volumeType drivers.VolumeType) ([]db.StorageVolumeArgs, error) + func VolumeDBTypeToType(volDBType int) (drivers.VolumeType, error) + func VolumeTypeNameToDBType(volumeTypeName string) (int, error) + func VolumeTypeToAPIInstanceType(volType drivers.VolumeType) (api.InstanceType, error) + func VolumeTypeToDBType(volType drivers.VolumeType) (int, error) + func VolumeUsedByDaemon(s *state.State, poolName string, volumeName string) (bool, error) + func VolumeUsedByExclusiveRemoteInstancesWithProfiles(s *state.State, poolName string, projectName string, vol *api.StorageVolume) (*db.InstanceArgs, error) + func VolumeUsedByInstanceDevices(s *state.State, poolName string, projectName string, vol *api.StorageVolume, ...) error + func VolumeUsedByProfileDevices(s *state.State, poolName string, projectName string, vol *api.StorageVolume, ...) error + type ComparableSnapshot struct + CreationDate time.Time + ID string + Name string + type MountInfo struct + DiskPath string + PostHooks []func(inst instance.Instance) error + func InstanceMount(pool Pool, inst instance.Instance, op *operations.Operation) (*MountInfo, error) + type Pool interface + ActivateBucket func(projectName string, bucketName string, op *operations.Operation) (*miniod.Process, error) + ApplyPatch func(name string) error + BackupBucket func(projectName string, bucketName string, ...) error + BackupCustomVolume func(projectName string, volName string, ...) error + BackupInstance func(inst instance.Instance, tarWriter *instancewriter.InstanceTarWriter, ...) error + CheckInstanceBackupFileSnapshots func(backupConf *backupConfig.Config, projectName string, deleteMissing bool, ...) ([]*api.InstanceSnapshot, error) + CleanupInstancePaths func(inst instance.Instance, op *operations.Operation) error + Create func(clientType request.ClientType, op *operations.Operation) error + CreateBucket func(projectName string, bucket api.StorageBucketsPost, op *operations.Operation) error + CreateBucketFromBackup func(srcBackup backup.Info, srcData io.ReadSeeker, op *operations.Operation) error + CreateBucketKey func(projectName string, bucketName string, key api.StorageBucketKeysPost, ...) (*api.StorageBucketKey, error) + CreateCustomVolume func(projectName string, volName string, desc string, config map[string]string, ...) error + CreateCustomVolumeFromBackup func(srcBackup backup.Info, srcData io.ReadSeeker, op *operations.Operation) error + CreateCustomVolumeFromCopy func(projectName string, srcProjectName string, volName, desc string, ...) error + CreateCustomVolumeFromISO func(projectName string, volName string, srcData io.ReadSeeker, size int64, ...) error + CreateCustomVolumeFromMigration func(projectName string, conn io.ReadWriteCloser, args migration.VolumeTargetArgs, ...) error + CreateCustomVolumeSnapshot func(projectName string, volName string, newSnapshotName string, ...) error + CreateInstance func(inst instance.Instance, op *operations.Operation) error + CreateInstanceFromBackup func(srcBackup backup.Info, srcData io.ReadSeeker, op *operations.Operation) (func(instance.Instance) error, revert.Hook, error) + CreateInstanceFromCopy func(inst instance.Instance, src instance.Instance, snapshots bool, ...) error + CreateInstanceFromImage func(inst instance.Instance, fingerprint string, op *operations.Operation) error + CreateInstanceFromMigration func(inst instance.Instance, conn io.ReadWriteCloser, ...) error + CreateInstanceSnapshot func(inst instance.Instance, src instance.Instance, op *operations.Operation) error + Delete func(clientType request.ClientType, op *operations.Operation) error + DeleteBucket func(projectName string, bucketName string, op *operations.Operation) error + DeleteBucketKey func(projectName string, bucketName string, keyName string, ...) error + DeleteCustomVolume func(projectName string, volName string, op *operations.Operation) error + DeleteCustomVolumeSnapshot func(projectName string, volName string, op *operations.Operation) error + DeleteImage func(fingerprint string, op *operations.Operation) error + DeleteInstance func(inst instance.Instance, op *operations.Operation) error + DeleteInstanceSnapshot func(inst instance.Instance, op *operations.Operation) error + Description func() string + Driver func() drivers.Driver + EnsureImage func(fingerprint string, op *operations.Operation) error + GenerateBucketBackupConfig func(projectName string, bucketName string, op *operations.Operation) (*backupConfig.Config, error) + GenerateCustomVolumeBackupConfig func(projectName string, volName string, snapshots bool, op *operations.Operation) (*backupConfig.Config, error) + GenerateInstanceBackupConfig func(inst instance.Instance, snapshots bool, op *operations.Operation) (*backupConfig.Config, error) + GetBucketURL func(bucketName string) *url.URL + GetCustomVolumeDisk func(projectName string, volName string) (string, error) + GetCustomVolumeUsage func(projectName string, volName string) (*VolumeUsage, error) + GetInstanceUsage func(inst instance.Instance) (*VolumeUsage, error) + GetResources func() (*api.ResourcesStoragePool, error) + GetVolume func(volumeType drivers.VolumeType, contentType drivers.ContentType, name string, ...) drivers.Volume + ID func() int64 + ImportBucket func(projectName string, poolVol *backupConfig.Config, op *operations.Operation) (revert.Hook, error) + ImportCustomVolume func(projectName string, poolVol *backupConfig.Config, op *operations.Operation) (revert.Hook, error) + ImportInstance func(inst instance.Instance, poolVol *backupConfig.Config, op *operations.Operation) (revert.Hook, error) + IsUsed func() (bool, error) + ListUnknownVolumes func(op *operations.Operation) (map[string][]*backupConfig.Config, error) + LocalStatus func() string + MigrateCustomVolume func(projectName string, conn io.ReadWriteCloser, args *migration.VolumeSourceArgs, ...) error + MigrateInstance func(inst instance.Instance, conn io.ReadWriteCloser, ...) error + MigrationTypes func(contentType drivers.ContentType, refresh bool, copySnapshots bool) []migration.Type + Mount func() (bool, error) + MountCustomVolume func(projectName string, volName string, op *operations.Operation) (*MountInfo, error) + MountInstance func(inst instance.Instance, op *operations.Operation) (*MountInfo, error) + MountInstanceSnapshot func(inst instance.Instance, op *operations.Operation) (*MountInfo, error) + Name func() string + RefreshCustomVolume func(projectName string, srcProjectName string, volName, desc string, ...) error + RefreshInstance func(inst instance.Instance, src instance.Instance, ...) error + RenameCustomVolume func(projectName string, volName string, newVolName string, ...) error + RenameCustomVolumeSnapshot func(projectName string, volName string, newSnapshotName string, ...) error + RenameInstance func(inst instance.Instance, newName string, op *operations.Operation) error + RenameInstanceSnapshot func(inst instance.Instance, newName string, op *operations.Operation) error + RestoreCustomVolume func(projectName string, volName string, snapshotName string, ...) error + RestoreInstanceSnapshot func(inst instance.Instance, src instance.Instance, op *operations.Operation) error + SetInstanceQuota func(inst instance.Instance, size string, vmStateSize string, ...) error + Status func() string + ToAPI func() api.StoragePool + Unmount func() (bool, error) + UnmountCustomVolume func(projectName string, volName string, op *operations.Operation) (bool, error) + UnmountInstance func(inst instance.Instance, op *operations.Operation) error + UnmountInstanceSnapshot func(inst instance.Instance, op *operations.Operation) error + Update func(clientType request.ClientType, newDesc string, newConfig map[string]string, ...) error + UpdateBucket func(projectName string, bucketName string, bucket api.StorageBucketPut, ...) error + UpdateBucketKey func(projectName string, bucketName string, keyName string, ...) error + UpdateCustomVolume func(projectName string, volName string, newDesc string, ...) error + UpdateCustomVolumeSnapshot func(projectName string, volName string, newDesc string, ...) error + UpdateImage func(fingerprint string, newDesc string, newConfig map[string]string, ...) error + UpdateInstance func(inst instance.Instance, newDesc string, newConfig map[string]string, ...) error + UpdateInstanceBackupFile func(inst instance.Instance, snapshots bool, op *operations.Operation) error + UpdateInstanceSnapshot func(inst instance.Instance, newDesc string, newConfig map[string]string, ...) error + func LoadByInstance(s *state.State, inst instance.Instance) (Pool, error) + func LoadByName(s *state.State, name string) (Pool, error) + func LoadByRecord(s *state.State, poolID int64, poolInfo api.StoragePool, ...) (Pool, error) + func NewTemporary(state *state.State, info *api.StoragePool) (Pool, error) + type Type interface + Validate func(config map[string]string) error + ValidateName func(name string) error + func LoadByType(state *state.State, driverType string) (Type, error) + type VolumeUsage struct + Total int64 + Used int64 Other modules containing this package github.com/lxc/incus