Documentation ¶
Index ¶
- Variables
- type FileInfo
- type Handle
- func (me *Handle) CleanupSnapshots() error
- func (me *Handle) Close() error
- func (me *Handle) DeletePrefix(prefix []byte) error
- func (me *Handle) ListKeys(prefix string) (keys []string, err error)
- func (me *Handle) MovePrefix(from, to []byte) error
- func (me *Handle) NewReader() (r Reader, err error)
- func (me *Handle) NewWriter() (w *Writer, err error)
- func (me *Handle) PutBuf(key string, buf []byte) error
- func (me *Handle) SetInstanceLimits(limits Limits) error
- func (me *Handle) SingleDelete(key string) (fi generics.Option[FileInfo], err error)
- func (me *Handle) SingleReadAt(key string, off int64, p []byte) (n int, err error)
- func (me *Handle) SingleStat(key string) (fi FileInfo, ok bool)
- type Item
- type Limits
- type Rc
- type Reader
- type Value
- type ValueWriter
- type Writer
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrHandleClosed = errors.New("possum Handle closed")
Functions ¶
This section is empty.
Types ¶
type Handle ¶
type Handle struct {
// contains filtered or unexported fields
}
func (*Handle) CleanupSnapshots ¶
func (*Handle) DeletePrefix ¶ added in v0.2.0
func (*Handle) MovePrefix ¶ added in v0.2.0
func (*Handle) SetInstanceLimits ¶
func (*Handle) SingleDelete ¶
func (*Handle) SingleReadAt ¶
type Rc ¶ added in v0.2.0
type Rc[T any] struct { // contains filtered or unexported fields }
func (*Rc[T]) Deref ¶ added in v0.2.0
func (me *Rc[T]) Deref() T
Return the value. TODO: Should we allow modifying the value? In Rust we'd get a reference, but in Go we're more than likely working with a pointer resource, but it would be possible to do synchronization external to Rc to make it useful as a value type.
func (*Rc[T]) Drop ¶ added in v0.2.0
func (me *Rc[T]) Drop()
It's a logical error to do this more than once. Figure your shit out.
func (*Rc[T]) ValueDropped ¶ added in v0.2.0
The return is set when the inner value is dropped.
type ValueWriter ¶
type ValueWriter struct {
// contains filtered or unexported fields
}
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func (*Writer) Commit ¶
This consumes the Writer. You must commit a Writer after it's created or it will leak a reference to the Handle. There doesn't seem to be a way to abort it in the Go API.
func (*Writer) StartNewValue ¶
func (me *Writer) StartNewValue() (vw *ValueWriter, err error)
Click to show internal directories.
Click to hide internal directories.