fdbarray

package
v0.0.0-...-746fcef Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(database fdb.Database, name string, blockSize uint32, size uint64) error

func CreateBySubspace

func CreateBySubspace(database fdb.Database, subspace directory.DirectorySubspace, blockSize uint32, size uint64) error

Create a new array database - instance of the database name - name of the array blockSize - size of the block in bytes size - size of the volume in bytes

func Exists

func Exists(database fdb.Database, name string) (bool, error)

Exists returns true if an array with the specified name exists in the database

Types

type ArrayDescription

type ArrayDescription struct {
	VolumeName string
	Size       uint64
	BlockSize  uint32
}

ArrayDescription is a short summary about the array

func List

func List(database fdb.Database) []ArrayDescription

List all arrays

type FDBArray

type FDBArray struct {
	// contains filtered or unexported fields
}

FDBArray holds metadata and directories of the respective array

func OpenByName

func OpenByName(database fdb.Database, name string, blocksPerTransaction uint32) (FDBArray, error)

func OpenBySubspace

func OpenBySubspace(database fdb.Database, subspace directory.DirectorySubspace, blocksPerTransaction uint32) (FDBArray, error)

Open and initialize an already created array. Calling this function will disconnect any other connected clients.

func (FDBArray) BlockSize

func (array FDBArray) BlockSize() uint32

BlockSize of the underlying array

func (FDBArray) Clear

func (array FDBArray) Clear()

Clear the array

func (FDBArray) Delete

func (array FDBArray) Delete()

Delete the array

func (FDBArray) Read

func (array FDBArray) Read(read []byte, offset uint64) error

func (FDBArray) Size

func (array FDBArray) Size() uint64

Size of the volume in bytes

func (FDBArray) Usage

func (array FDBArray) Usage() (uint64, error)

Usage of the array

func (FDBArray) Write

func (array FDBArray) Write(write []byte, offset uint64) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL