labelgraph

package
v0.8.18 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2018 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

Package labelgraph implements DVID support for data using the underlying graph storage engine.

Index

Constants

View Source
const (
	Version  = "0.1"
	RepoURL  = "github.com/janelia-flyem/dvid/datatype/labelgraph"
	TypeName = "labelgraph"
)

Variables

This section is empty.

Functions

func NewTransactionGroup

func NewTransactionGroup(log *transactionLog, current_requestor_id uint64) *transactionGroup

NewTransactionGroup returns a pointer to a new transaction group

func NewTransactionLog

func NewTransactionLog() *transactionLog

NewTransactionLog creats a pointer to transaction log, initializing relevant maps

Types

type Data

type Data struct {
	*datastore.Data
	// contains filtered or unexported fields
}

Data embeds the datastore's Data and extends it with transaction properties (default values are okay after deserializing).

func (*Data) DoRPC

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

DoRPC acts as a switchboard for RPC commands -- not supported

func (*Data) Equals

func (d *Data) Equals(d2 *Data) bool

func (*Data) ExtractGraph

func (d *Data) ExtractGraph(r *http.Request, disableSchema bool) (*LabelGraph, error)

ExtractGraph takes the client's supplied JSON, verifies that it conforms to the schema, and loads it into the LabelGraph data structure

func (*Data) GobDecode

func (d *Data) GobDecode(b []byte) error

func (*Data) GobEncode

func (d *Data) GobEncode() ([]byte, error)

func (*Data) Help

func (d *Data) Help() string

Help returns help mesage for datatype

func (*Data) MarshalJSON

func (d *Data) MarshalJSON() ([]byte, error)

func (*Data) ServeHTTP

func (d *Data) ServeHTTP(uuid dvid.UUID, ctx *datastore.VersionedCtx, w http.ResponseWriter, r *http.Request)

ServeHTTP handles all incoming HTTP requests for this data.

type LabelGraph

type LabelGraph struct {
	Transactions []transactionItem // transaction ids associated with vertices
	Vertices     []labelVertex
	Edges        []labelEdge
}

LabelGraph encodes data exchanged with a client

type Type

type Type struct {
	datastore.Type
}

Type embeds the datastore's Type to create a unique type for labelgraph functions.

func NewType

func NewType() *Type

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

func (*Type) Help

func (dtype *Type) Help() string

Help returns help mesage for datatype

func (*Type) NewDataService

func (dtype *Type) NewDataService(uuid dvid.UUID, id dvid.InstanceID, name dvid.InstanceName, c dvid.Config) (datastore.DataService, error)

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

Jump to

Keyboard shortcuts

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