keyvalue

package
v0.0.0-...-e545f54 Latest Latest
Warning

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

Go to latest
Published: May 6, 2014 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

Package keyvalue implements DVID support for data using generic key/value.

Index

Constants

View Source
const (
	Version = "0.1"
	RepoUrl = "github.com/janelia-flyem/dvid/datatype/keyvalue"
)
View Source
const HelpMessage = `` /* 3612-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	*datastore.Data
}

Data embeds the datastore's Data and extends it with keyvalue properties (none for now).

func (*Data) DoHTTP

func (d *Data) DoHTTP(uuid dvid.UUID, w http.ResponseWriter, r *http.Request) error

DoHTTP handles all incoming HTTP requests for this data.

func (*Data) DoRPC

func (d *Data) DoRPC(request datastore.Request, reply *datastore.Response) error

DoRPC acts as a switchboard for RPC commands.

func (*Data) FUSEDir

func (d *Data) FUSEDir(vinfo storage.VersionInfo) storage.FUSEDirer

func (*Data) Get

func (d *Data) Get(request datastore.Request, reply *datastore.Response) error

Get retrieves data given a key and a version node.

func (*Data) GetData

func (d *Data) GetData(uuid dvid.UUID, keyStr string) (value []byte, found bool, err error)

GetData gets a value using a key at a given uuid

func (*Data) JSONString

func (d *Data) JSONString() (jsonStr string, err error)

JSONString returns the JSON for this Data's configuration

func (*Data) Mount

func (d *Data) Mount(request datastore.Request, reply *datastore.Response) error

Mount creates (if not already present) a FUSE file system for this data.

func (*Data) Put

func (d *Data) Put(request datastore.Request, reply *datastore.Response) error

Put puts file data data to a version node.

func (*Data) PutData

func (d *Data) PutData(uuid dvid.UUID, keyStr string, value []byte) error

PutData puts a key/value at a given uuid

type Datatype

type Datatype struct {
	datastore.Datatype
}

Datatype embeds the datastore's Datatype to create a unique type for keyvalue functions.

func NewDatatype

func NewDatatype() (dtype *Datatype)

NewDatatype returns a pointer to a new keyvalue Datatype with default values set.

func (*Datatype) Help

func (dtype *Datatype) Help() string

func (*Datatype) NewDataService

func (dtype *Datatype) NewDataService(id *datastore.DataID, c dvid.Config) (datastore.DataService, error)

NewData returns a pointer to new keyvalue data with default values.

type Dir

type Dir struct {
	*Data
	storage.VersionInfo
}

Dir implements both Node and Handle for this data directory Each directory is specific to one data in a dataset.

func (Dir) Attr

func (d Dir) Attr() fuse.Attr

func (Dir) Lookup

func (d Dir) Lookup(name string, intr fs.Intr) (fs.Node, fuse.Error)

func (Dir) ReadDir

func (d Dir) ReadDir(intr fs.Intr) ([]fuse.Dirent, fuse.Error)

ReadDir returns a list of keys available for this data and its version.

func (Dir) Write

func (d Dir) Write(req *fuse.WriteRequest, resp *fuse.WriteResponse, intr fs.Intr) fuse.Error

type File

type File struct {
	*Dir
	// contains filtered or unexported fields
}

File implements both Node and Handle for a keyvalue entry.

func (File) Attr

func (f File) Attr() fuse.Attr

func (File) Read

func (f File) Read(req *fuse.ReadRequest, resp *fuse.ReadResponse, intr fs.Intr) fuse.Error

func (File) ReadAll

func (f File) ReadAll(intr fs.Intr) ([]byte, fuse.Error)

func (File) Write

func (f File) Write(req *fuse.WriteRequest, resp *fuse.WriteResponse, intr fs.Intr) fuse.Error

Append data

func (File) WriteAll

func (f File) WriteAll(b []byte, intr fs.Intr) fuse.Error

Replace data

Jump to

Keyboard shortcuts

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