Versions in this module Expand all Collapse all v0 v0.14.2 Feb 24, 2022 v0.14.1 Feb 24, 2022 Changes in this version + const DisableWholeObject + const EnableWholeObject + const EncryptionAlgorithmAES128 + const EncryptionAlgorithmAES256 + const ErrNotExist + const ExcludeParent + const FeatureDataPool + const FeatureDeepFlatten + const FeatureExclusiveLock + const FeatureFastDiff + const FeatureJournaling + const FeatureLayering + const FeatureMigrating + const FeatureNameDataPool + const FeatureNameDeepFlatten + const FeatureNameExclusiveLock + const FeatureNameFastDiff + const FeatureNameJournaling + const FeatureNameLayering + const FeatureNameMigrating + const FeatureNameObjectMap + const FeatureNameOperations + const FeatureNameStripingV2 + const FeatureObjectMap + const FeatureOperations + const FeatureStripingV2 + const GroupImageStateAttached + const GroupImageStateIncomplete + const GroupSnapStateComplete + const GroupSnapStateIncomplete + const ImageMirrorModeJournal + const ImageMirrorModeSnapshot + const ImageOptionCloneFormat + const ImageOptionDataPool + const ImageOptionFeatures + const ImageOptionFeaturesClear + const ImageOptionFeaturesSet + const ImageOptionFlatten + const ImageOptionFormat + const ImageOptionJournalOrder + const ImageOptionJournalPool + const ImageOptionJournalSplayWidth + const ImageOptionMirrorImageMode + const ImageOptionOrder + const ImageOptionStripeCount + const ImageOptionStripeUnit + const IncludeParent + const MirrorImageDisabled + const MirrorImageDisabling + const MirrorImageEnabled + const MirrorImageStatusStateError + const MirrorImageStatusStateReplaying + const MirrorImageStatusStateStartingReplay + const MirrorImageStatusStateStopped + const MirrorImageStatusStateStoppingReplay + const MirrorImageStatusStateSyncing + const MirrorImageStatusStateUnknown + const MirrorModeDisabled + const MirrorModeImage + const MirrorModePool + const MirrorPeerDirectionRx + const MirrorPeerDirectionRxTx + const MirrorPeerDirectionTx + const NoSnapshot + const PoolStatOptionImageMaxProvisionedBytes + const PoolStatOptionImageProvisionedBytes + const PoolStatOptionImageSnapshots + const PoolStatOptionImages + const PoolStatOptionTrashImages + const PoolStatOptionTrashMaxProvisionedBytes + const PoolStatOptionTrashProvisionedBytes + const PoolStatOptionTrashSnapshots + const RbdFeatureDataPool + const RbdFeatureDeepFlatten + const RbdFeatureExclusiveLock + const RbdFeatureFastDiff + const RbdFeatureJournaling + const RbdFeatureLayering + const RbdFeatureObjectMap + const RbdFeatureStripingV2 + const RbdFeaturesDefault + const RbdFeaturesIncompatible + const RbdFeaturesMutable + const RbdFeaturesRwIncompatible + const RbdFeaturesSingleClient + const RbdImageOptionDataPool + const RbdImageOptionFeatures + const RbdImageOptionFeaturesClear + const RbdImageOptionFeaturesSet + const RbdImageOptionFormat + const RbdImageOptionJournalOrder + const RbdImageOptionJournalPool + const RbdImageOptionJournalSplayWidth + const RbdImageOptionOrder + const RbdImageOptionStripeCount + const RbdImageOptionStripeUnit + const SeekCur + const SeekEnd + const SeekSet + const SnapNamespaceTypeGroup + const SnapNamespaceTypeTrash + const SnapNamespaceTypeUser + var ErrImageIsOpen = errors.New("RBD image is open") + var ErrImageNotOpen = errors.New("RBD image not open") + var ErrNoIOContext = errors.New("IOContext is missing") + var ErrNoName = errors.New("RBD image does not have a name") + var ErrNoNamespaceName = errors.New("Namespace value is missing") + var ErrNotFound = errors.New("RBD image not found") + var ErrSnapshotNoName = errors.New("RBD snapshot does not have a name") + var RbdErrorImageNotOpen = ErrImageNotOpen + var RbdErrorNotFound = ErrNotFound + func CloneFromImage(parent *Image, snapName string, destctx *rados.IOContext, name string, ...) error + func CloneImage(ioctx *rados.IOContext, parentName, snapName string, destctx *rados.IOContext, ...) error + func CreateImage(ioctx *rados.IOContext, name string, size uint64, rio *ImageOptions) error + func CreateMirrorPeerBootstrapToken(ioctx *rados.IOContext) (string, error) + func GetAllPoolStats(ioctx *rados.IOContext) (map[PoolStatOption]uint64, error) + func GetImageNames(ioctx *rados.IOContext) ([]string, error) + func GetMirrorSiteName(conn *rados.Conn) (string, error) + func GetMirrorUUID(ioctx *rados.IOContext) (string, error) + func GetPoolMetadata(ioctx *rados.IOContext, key string) (string, error) + func GroupCreate(ioctx *rados.IOContext, name string) error + func GroupImageAdd(groupIoctx *rados.IOContext, groupName string, imageIoctx *rados.IOContext, ...) error + func GroupImageRemove(groupIoctx *rados.IOContext, groupName string, imageIoctx *rados.IOContext, ...) error + func GroupImageRemoveByID(groupIoctx *rados.IOContext, groupName string, imageIoctx *rados.IOContext, ...) error + func GroupList(ioctx *rados.IOContext) ([]string, error) + func GroupRemove(ioctx *rados.IOContext, name string) error + func GroupRename(ioctx *rados.IOContext, src, dest string) error + func GroupSnapCreate(ioctx *rados.IOContext, group, snap string) error + func GroupSnapRemove(ioctx *rados.IOContext, group, snap string) error + func GroupSnapRename(ioctx *rados.IOContext, group, src, dest string) error + func GroupSnapRollback(ioctx *rados.IOContext, group, snap string) error + func GroupSnapRollbackWithProgress(ioctx *rados.IOContext, group, snap string, cb GroupSnapRollbackCallback, ...) error + func ImportMirrorPeerBootstrapToken(ioctx *rados.IOContext, direction MirrorPeerDirection, token string) error + func MirrorImageStatusSummary(ioctx *rados.IOContext) (map[MirrorImageStatusState]uint, error) + func NamespaceCreate(ioctx *rados.IOContext, namespaceName string) error + func NamespaceExists(ioctx *rados.IOContext, namespaceName string) (bool, error) + func NamespaceList(ioctx *rados.IOContext) (names []string, err error) + func NamespaceRemove(ioctx *rados.IOContext, namespaceName string) error + func PoolInit(ioctx *rados.IOContext, force bool) error + func RemoveImage(ioctx *rados.IOContext, name string) error + func RemovePoolMetadata(ioctx *rados.IOContext, key string) error + func SetMirrorMode(ioctx *rados.IOContext, mode MirrorMode) error + func SetMirrorSiteName(conn *rados.Conn, name string) error + func SetPoolMetadata(ioctx *rados.IOContext, key, value string) error + func TrashRemove(ioctx *rados.IOContext, id string, force bool) error + func TrashRestore(ioctx *rados.IOContext, id, name string) error + func Version() (int, int, int) + type DiffIncludeParent uint8 + type DiffIterateCallback func(uint64, uint64, int, interface{}) int + type DiffIterateConfig struct + Callback DiffIterateCallback + Data interface{} + IncludeParent DiffIncludeParent + Length uint64 + Offset uint64 + SnapName string + WholeObject DiffWholeObject + type DiffWholeObject uint8 + type EncryptionAlgorithm C.rbd_encryption_algorithm_t + type EncryptionOptions interface + type EncryptionOptionsLUKS1 struct + Alg EncryptionAlgorithm + Passphrase []byte + type EncryptionOptionsLUKS2 struct + Alg EncryptionAlgorithm + Passphrase []byte + type FeatureSet uint64 + func FeatureSetFromNames(names []string) FeatureSet + func (fs *FeatureSet) Names() []string + type GlobalMirrorImageIDAndStatus struct + ID string + Status GlobalMirrorImageStatus + func MirrorImageGlobalStatusList(ioctx *rados.IOContext, start string, max int) ([]GlobalMirrorImageIDAndStatus, error) + type GlobalMirrorImageStatus struct + Info MirrorImageInfo + Name string + SiteStatuses []SiteMirrorImageStatus + func (gmis GlobalMirrorImageStatus) LocalStatus() (SiteMirrorImageStatus, error) + type GroupImageInfo struct + Name string + PoolID int64 + State GroupImageState + func GroupImageList(ioctx *rados.IOContext, name string) ([]GroupImageInfo, error) + type GroupImageState int + type GroupInfo struct + Name string + PoolID int64 + type GroupSnapInfo struct + Name string + State GroupSnapState + func GroupSnapList(ioctx *rados.IOContext, group string) ([]GroupSnapInfo, error) + type GroupSnapRollbackCallback func(uint64, uint64, interface{}) int + type GroupSnapState int + type Image struct + func Create(ioctx *rados.IOContext, name string, size uint64, order int, args ...uint64) (image *Image, err error) + func Create2(ioctx *rados.IOContext, name string, size uint64, features uint64, order int) (image *Image, err error) + func Create3(ioctx *rados.IOContext, name string, size uint64, features uint64, order int, ...) (image *Image, err error) + func GetImage(ioctx *rados.IOContext, name string) *Image + func OpenImage(ioctx *rados.IOContext, name, snapName string) (*Image, error) + func OpenImageById(ioctx *rados.IOContext, id, snapName string) (*Image, error) + func OpenImageByIdReadOnly(ioctx *rados.IOContext, id, snapName string) (*Image, error) + func OpenImageReadOnly(ioctx *rados.IOContext, name, snapName string) (*Image, error) + func (image *Image) BreakLock(client string, cookie string) error + func (image *Image) Clone(snapname string, cIoctx *rados.IOContext, cName string, features uint64, ...) (*Image, error) + func (image *Image) Close() error + func (image *Image) Copy(ioctx *rados.IOContext, destname string) error + func (image *Image) Copy2(dest *Image) error + func (image *Image) CreateMirrorSnapshot() (uint64, error) + func (image *Image) CreateSnapshot(snapname string) (*Snapshot, error) + func (image *Image) DeepCopy(ioctx *rados.IOContext, destname string, rio *ImageOptions) error + func (image *Image) DiffIterate(config DiffIterateConfig) error + func (image *Image) Discard(ofs uint64, length uint64) (int, error) + func (image *Image) EncryptionFormat(opts EncryptionOptions) error + func (image *Image) EncryptionLoad(opts EncryptionOptions) error + func (image *Image) Flatten() error + func (image *Image) Flush() error + func (image *Image) GetAccessTimestamp() (Timespec, error) + func (image *Image) GetCreateTimestamp() (Timespec, error) + func (image *Image) GetFeatures() (features uint64, err error) + func (image *Image) GetGlobalMirrorStatus() (GlobalMirrorImageStatus, error) + func (image *Image) GetGroup() (GroupInfo, error) + func (image *Image) GetId() (string, error) + func (image *Image) GetImageMirrorMode() (ImageMirrorMode, error) + func (image *Image) GetMetadata(key string) (string, error) + func (image *Image) GetMirrorImageInfo() (*MirrorImageInfo, error) + func (image *Image) GetModifyTimestamp() (Timespec, error) + func (image *Image) GetName() string + func (image *Image) GetOverlap() (overlap uint64, err error) + func (image *Image) GetParent() (*ParentInfo, error) + func (image *Image) GetParentInfo(pool, name, snapname []byte) error + func (image *Image) GetSize() (size uint64, err error) + func (image *Image) GetSnapByID(snapID uint64) (string, error) + func (image *Image) GetSnapID(snapName string) (uint64, error) + func (image *Image) GetSnapNamespaceType(snapID uint64) (SnapNamespaceType, error) + func (image *Image) GetSnapTimestamp(snapID uint64) (Timespec, error) + func (image *Image) GetSnapTrashNamespace(snapID uint64) (string, error) + func (image *Image) GetSnapshot(snapname string) *Snapshot + func (image *Image) GetSnapshotNames() (snaps []SnapInfo, err error) + func (image *Image) GetStripeCount() (uint64, error) + func (image *Image) GetStripeUnit() (uint64, error) + func (image *Image) IsOldFormat() (bool, error) + func (image *Image) ListChildren() (pools []string, images []string, err error) + func (image *Image) ListLockers() (tag string, lockers []Locker, err error) + func (image *Image) ListMetadata() (map[string]string, error) + func (image *Image) ListWatchers() ([]ImageWatcher, error) + func (image *Image) LockExclusive(cookie string) error + func (image *Image) LockShared(cookie string, tag string) error + func (image *Image) MirrorDemote() error + func (image *Image) MirrorDisable(force bool) error + func (image *Image) MirrorEnable(mode ImageMirrorMode) error + func (image *Image) MirrorInstanceID() (string, error) + func (image *Image) MirrorPromote(force bool) error + func (image *Image) MirrorResync() error + func (image *Image) Open(args ...interface{}) error + func (image *Image) Read(data []byte) (int, error) + func (image *Image) ReadAt(data []byte, off int64) (int, error) + func (image *Image) Remove() error + func (image *Image) RemoveMetadata(key string) error + func (image *Image) Rename(destname string) error + func (image *Image) Resize(size uint64) error + func (image *Image) Seek(offset int64, whence int) (int64, error) + func (image *Image) SetMetadata(key string, value string) error + func (image *Image) SetSnapByID(snapID uint64) error + func (image *Image) SetSnapshot(snapname string) error + func (image *Image) Sparsify(sparseSize uint) error + func (image *Image) Stat() (info *ImageInfo, err error) + func (image *Image) Trash(delay time.Duration) error + func (image *Image) Unlock(cookie string) error + func (image *Image) UpdateFeatures(features uint64, enabled bool) error + func (image *Image) UpdateWatch(cb WatchCallback, data interface{}) (*Watch, error) + func (image *Image) Write(data []byte) (n int, err error) + func (image *Image) WriteAt(data []byte, off int64) (n int, err error) + func (image *Image) WriteSame(ofs, n uint64, data []byte, flags rados.OpFlags) (int64, error) + type ImageInfo struct + Block_name_prefix string + Num_objs uint64 + Obj_size uint64 + Order int + Size uint64 + type ImageMirrorMode int64 + func (imm ImageMirrorMode) String() string + type ImageMirrorModeFilter interface + type ImageOption C.int + type ImageOptions struct + func NewRbdImageOptions() *ImageOptions + func (rio *ImageOptions) Clear() + func (rio *ImageOptions) Destroy() + func (rio *ImageOptions) GetString(option ImageOption) (string, error) + func (rio *ImageOptions) GetUint64(option ImageOption) (uint64, error) + func (rio *ImageOptions) IsEmpty() bool + func (rio *ImageOptions) IsSet(option ImageOption) (bool, error) + func (rio *ImageOptions) SetString(option ImageOption, value string) error + func (rio *ImageOptions) SetUint64(option ImageOption, value uint64) error + func (rio *ImageOptions) Unset(option ImageOption) error + type ImageSpec struct + ImageName string + PoolName string + type ImageWatcher struct + Addr string + Cookie uint64 + Id int64 + type Locker struct + Addr string + Client string + Cookie string + type MirrorImageGlobalStatusIter struct + func NewMirrorImageGlobalStatusIter(ioctx *rados.IOContext) *MirrorImageGlobalStatusIter + func (*MirrorImageGlobalStatusIter) Close() error + func (iter *MirrorImageGlobalStatusIter) Next() (*GlobalMirrorImageIDAndStatus, error) + type MirrorImageInfo struct + GlobalID string + Primary bool + State MirrorImageState + type MirrorImageInfoItem struct + ID string + Info MirrorImageInfo + Mode ImageMirrorMode + func MirrorImageInfoList(ioctx *rados.IOContext, modeFilter ImageMirrorModeFilter, start string, ...) ([]MirrorImageInfoItem, error) + type MirrorImageInfoIter struct + func NewMirrorImageInfoIter(ioctx *rados.IOContext, modeFilter ImageMirrorModeFilter) *MirrorImageInfoIter + func (iter *MirrorImageInfoIter) Next() (*MirrorImageInfoItem, error) + type MirrorImageInstanceIDItem struct + ID string + InstanceID string + func MirrorImageInstanceIDList(ioctx *rados.IOContext, start string, max int) ([]MirrorImageInstanceIDItem, error) + type MirrorImageInstanceIDIter struct + func NewMirrorImageInstanceIDIter(ioctx *rados.IOContext) *MirrorImageInstanceIDIter + func (iter *MirrorImageInstanceIDIter) Next() (*MirrorImageInstanceIDItem, error) + type MirrorImageState C.rbd_mirror_image_state_t + func (mis MirrorImageState) String() string + type MirrorImageStatusState int64 + func (state MirrorImageStatusState) String() (s string) + type MirrorMode int64 + func GetMirrorMode(ioctx *rados.IOContext) (MirrorMode, error) + func (m MirrorMode) String() string + type MirrorPeerDirection int + type ParentInfo struct + Image ImageSpec + Snap SnapSpec + type PoolStatOption C.rbd_pool_stat_option_t + type RbdImageOption = ImageOption + type RbdImageOptions = ImageOptions + type SiteMirrorImageStatus struct + Description string + LastUpdate int64 + MirrorUUID string + State MirrorImageStatusState + Up bool + type SnapInfo struct + Id uint64 + Name string + Size uint64 + type SnapNamespaceType C.rbd_snap_namespace_type_t + type SnapSpec struct + ID uint64 + SnapName string + type Snapshot struct + func (snapshot *Snapshot) IsProtected() (bool, error) + func (snapshot *Snapshot) Protect() error + func (snapshot *Snapshot) Remove() error + func (snapshot *Snapshot) Rollback() error + func (snapshot *Snapshot) Set() error + func (snapshot *Snapshot) Unprotect() error + type Timespec ts.Timespec + type TrashInfo struct + DefermentEndTime time.Time + DeletionTime time.Time + Id string + Name string + func GetTrashList(ioctx *rados.IOContext) ([]TrashInfo, error) + type Watch struct + func (w *Watch) Unwatch() error + type WatchCallback func(interface{})