Versions in this module Expand all Collapse all v0 v0.14.2 Feb 24, 2022 Changes in this version type IOContext + func (ioctx *IOContext) WriteFullWithPutHash(oid string, data []byte) error v0.14.1 Feb 24, 2022 Changes in this version + const AllNamespaces + const CreateExclusive + const CreateIdempotent + const ErrNotFound + const ErrObjectExists + const ErrPermissionDenied + const OpFlagExcl + const OpFlagFAdviseDontNeed + const OpFlagFAdviseFUA + const OpFlagFAdviseNoCache + const OpFlagFAdviseRandom + const OpFlagFAdviseSequential + const OpFlagFAdviseWillNeed + const OpFlagFailOk + const OpFlagNone + const OperationBalanceReads + const OperationFullForce + const OperationFullTry + const OperationIgnoreCache + const OperationIgnoreOverlay + const OperationIgnoreRedirect + const OperationLocalizeReads + const OperationNoFlag + const OperationOrderReadsWrites + const OperationOrderSnap + const OperationSkipRWLocks + const RadosAllNamespaces + const RadosErrorNotFound + const RadosErrorPermissionDenied + const SnapHead + var ErrEmptyArgument = errors.New("Argument must contain at least one item") + var ErrInvalidIOContext = errors.New("IOContext is not ready for use") + var ErrNotConnected = errors.New("RADOS not connected") + var ErrOperationIncomplete = errors.New("Operation has not been performed yet") + func Version() (int, int, int) + type ClusterRef C.rados_t + type ClusterStat struct + Kb uint64 + Kb_avail uint64 + Kb_used uint64 + Num_objects uint64 + type Conn struct + func NewConn() (*Conn, error) + func NewConnWithClusterAndUser(clusterName string, userName string) (*Conn, error) + func NewConnWithUser(user string) (*Conn, error) + func (c *Conn) Cluster() ClusterRef + func (c *Conn) Connect() error + func (c *Conn) DeletePool(name string) error + func (c *Conn) GetClusterStats() (stat ClusterStat, err error) + func (c *Conn) GetConfigOption(name string) (value string, err error) + func (c *Conn) GetFSID() (fsid string, err error) + func (c *Conn) GetInstanceID() uint64 + func (c *Conn) GetPoolByID(id int64) (string, error) + func (c *Conn) GetPoolByName(name string) (int64, error) + func (c *Conn) ListPools() (names []string, err error) + func (c *Conn) MakePool(name string) error + func (c *Conn) MgrCommand(args [][]byte) ([]byte, string, error) + func (c *Conn) MgrCommandWithInputBuffer(args [][]byte, inputBuffer []byte) ([]byte, string, error) + func (c *Conn) MonCommand(args []byte) ([]byte, string, error) + func (c *Conn) MonCommandTarget(name string, args [][]byte) ([]byte, string, error) + func (c *Conn) MonCommandTargetWithInputBuffer(name string, args [][]byte, inputBuffer []byte) ([]byte, string, error) + func (c *Conn) MonCommandWithInputBuffer(args, inputBuffer []byte) ([]byte, string, error) + func (c *Conn) OpenIOContext(pool string) (*IOContext, error) + func (c *Conn) OsdCommand(osd int, args [][]byte) ([]byte, string, error) + func (c *Conn) OsdCommandWithInputBuffer(osd int, args [][]byte, inputBuffer []byte) ([]byte, string, error) + func (c *Conn) PGCommand(pgid []byte, args [][]byte) ([]byte, string, error) + func (c *Conn) PGCommandWithInputBuffer(pgid []byte, args [][]byte, inputBuffer []byte) ([]byte, string, error) + func (c *Conn) ParseCmdLineArgs(args []string) error + func (c *Conn) ParseConfigArgv(argv []string) error + func (c *Conn) ParseDefaultConfigEnv() error + func (c *Conn) PingMonitor(id string) (string, error) + func (c *Conn) ReadConfigFile(path string) error + func (c *Conn) ReadDefaultConfigFile() error + func (c *Conn) SetConfigOption(option, value string) error + func (c *Conn) Shutdown() + func (c *Conn) WaitForLatestOSDMap() error + type CreateOption int + type GetOmapStep struct + func (gos *GetOmapStep) More() bool + func (gos *GetOmapStep) Next() (*OmapKeyValue, error) + type IOContext struct + func (ioctx *IOContext) Append(oid string, data []byte) error + func (ioctx *IOContext) BreakLock(oid, name, client, cookie string) (int, error) + func (ioctx *IOContext) CleanOmap(oid string) error + func (ioctx *IOContext) Create(oid string, exclusive CreateOption) error + func (ioctx *IOContext) CreateSnap(snapName string) error + func (ioctx *IOContext) Delete(oid string) error + func (ioctx *IOContext) Destroy() + func (ioctx *IOContext) GetAllOmapValues(oid string, startAfter string, filterPrefix string, iteratorSize int64) (map[string][]byte, error) + func (ioctx *IOContext) GetLastVersion() (uint64, error) + func (ioctx *IOContext) GetNamespace() (string, error) + func (ioctx *IOContext) GetOmapValues(oid string, startAfter string, filterPrefix string, maxReturn int64) (map[string][]byte, error) + func (ioctx *IOContext) GetPoolID() int64 + func (ioctx *IOContext) GetPoolName() (name string, err error) + func (ioctx *IOContext) GetPoolStats() (stat PoolStat, err error) + func (ioctx *IOContext) GetSnapName(snapID SnapID) (string, error) + func (ioctx *IOContext) GetSnapStamp(snapID SnapID) (time.Time, error) + func (ioctx *IOContext) GetXattr(object string, name string, data []byte) (int, error) + func (ioctx *IOContext) Iter() (*Iter, error) + func (ioctx *IOContext) ListLockers(oid, name string) (*LockInfo, error) + func (ioctx *IOContext) ListObjects(listFn ObjectListFunc) error + func (ioctx *IOContext) ListOmapValues(oid string, startAfter string, filterPrefix string, maxReturn int64, ...) error + func (ioctx *IOContext) ListSnaps() ([]SnapID, error) + func (ioctx *IOContext) ListXattrs(oid string) (map[string][]byte, error) + func (ioctx *IOContext) LockExclusive(oid, name, cookie, desc string, duration time.Duration, flags *byte) (int, error) + func (ioctx *IOContext) LockShared(oid, name, cookie, tag, desc string, duration time.Duration, flags *byte) (int, error) + func (ioctx *IOContext) LookupSnap(snapName string) (SnapID, error) + func (ioctx *IOContext) Pointer() unsafe.Pointer + func (ioctx *IOContext) Read(oid string, data []byte, offset uint64) (int, error) + func (ioctx *IOContext) RemoveSnap(snapName string) error + func (ioctx *IOContext) RmOmapKeys(oid string, keys []string) error + func (ioctx *IOContext) RmXattr(oid string, name string) error + func (ioctx *IOContext) RollbackSnap(oid, snapName string) error + func (ioctx *IOContext) SetNamespace(namespace string) + func (ioctx *IOContext) SetOmap(oid string, pairs map[string][]byte) error + func (ioctx *IOContext) SetPoolFullTry() error + func (ioctx *IOContext) SetReadSnap(snapID SnapID) error + func (ioctx *IOContext) SetXattr(object string, name string, data []byte) error + func (ioctx *IOContext) Stat(object string) (stat ObjectStat, err error) + func (ioctx *IOContext) Truncate(oid string, size uint64) error + func (ioctx *IOContext) Unlock(oid, name, cookie string) (int, error) + func (ioctx *IOContext) UnsetPoolFullTry() error + func (ioctx *IOContext) Write(oid string, data []byte, offset uint64) error + func (ioctx *IOContext) WriteFull(oid string, data []byte) error + type Iter struct + func (iter *Iter) Close() + func (iter *Iter) Err() error + func (iter *Iter) Namespace() string + func (iter *Iter) Next() bool + func (iter *Iter) Seek(token IterToken) + func (iter *Iter) Token() IterToken + func (iter *Iter) Value() string + type IterToken uint32 + type LockInfo struct + Addrs []string + Clients []string + Cookies []string + Exclusive bool + NumLockers int + Tag string + type ObjectListFunc func(oid string) + type ObjectStat struct + ModTime time.Time + Size uint64 + type OmapKeyValue struct + Key string + Value []byte + type OmapListFunc func(key string, value []byte) + type OpFlags uint + type OperationError struct + OpError error + StepErrors map[int]error + func (e OperationError) Error() string + type OperationFlags int + type PoolStat struct + Num_bytes uint64 + Num_kb uint64 + Num_object_clones uint64 + Num_object_copies uint64 + Num_objects uint64 + Num_objects_degraded uint64 + Num_objects_missing_on_primary uint64 + Num_objects_unfound uint64 + Num_rd uint64 + Num_rd_kb uint64 + Num_wr uint64 + Num_wr_kb uint64 + type ReadOp struct + func CreateReadOp() *ReadOp + func (r *ReadOp) AssertExists() + func (r *ReadOp) GetOmapValues(startAfter, filterPrefix string, maxReturn uint64) *GetOmapStep + func (r *ReadOp) Operate(ioctx *IOContext, oid string, flags OperationFlags) error + func (r *ReadOp) Release() + type SnapID C.rados_snap_t + type Timespec ts.Timespec + type WriteOp struct + func CreateWriteOp() *WriteOp + func (w *WriteOp) AssertExists() + func (w *WriteOp) CleanOmap() + func (w *WriteOp) CmpExt(b []byte, offset uint64) *WriteOpCmpExtStep + func (w *WriteOp) Create(exclusive CreateOption) + func (w *WriteOp) Operate(ioctx *IOContext, oid string, flags OperationFlags) error + func (w *WriteOp) OperateWithMtime(ioctx *IOContext, oid string, mtime Timespec, flags OperationFlags) error + func (w *WriteOp) Release() + func (w *WriteOp) RmOmapKeys(keys []string) + func (w *WriteOp) SetOmap(pairs map[string][]byte) + func (w *WriteOp) Write(b []byte, offset uint64) + func (w *WriteOp) WriteFull(b []byte) + func (w *WriteOp) WriteSame(b []byte, writeLen, offset uint64) + type WriteOpCmpExtStep struct + Result int