Documentation ¶
Overview ¶
Package server provides web and rpc interfaces to DVID operations. For web browser access, the goal is to provide a GUI for monitoring and performing a subset of operations in a nicely formatted view.
DVID command line interaction occurs via the rpc interface to a running server. Please see the main DVID documentation:
http://godoc.org/github.com/janelia-flyem/dvid
Examples of planned browser-based features in order of likely implementation:
Peruse documentation on DVID operation and APIs (HTTP and eventually Thrift).
Graphically show the image version DAG and allow the viewer to examine the provenance along the edges. (GUI for 'log' command.)
View slices of an image version via a javascript (or Dart) program. This could be extended to allow interactive editing and n-dimensional visualization.
Query remote DVID servers regarding the state of their volume.
Index ¶
- Constants
- Variables
- func ServerlessDo(datastoreDir string, request datastore.Request, reply *datastore.Response) error
- func Shutdown()
- type RPCConnection
- type Service
- type Subvolume
- func (m *Subvolume) GetData() []byte
- func (m *Subvolume) GetDataset() string
- func (m *Subvolume) GetOffsetX() int32
- func (m *Subvolume) GetOffsetY() int32
- func (m *Subvolume) GetOffsetZ() int32
- func (m *Subvolume) GetSizeX() uint32
- func (m *Subvolume) GetSizeY() uint32
- func (m *Subvolume) GetSizeZ() uint32
- func (*Subvolume) ProtoMessage()
- func (m *Subvolume) Reset()
- func (m *Subvolume) String() string
- type Terminal
Constants ¶
const ( // The default URL of the DVID web server DefaultWebAddress = "localhost:8000" // The default RPC address of the DVID RPC server DefaultRPCAddress = "localhost:8001" // The relative URL path to our Level 2 REST API WebAPIPath = "/api/" // The name of the server error log, stored in the datastore directory. ErrorLogFilename = "dvid-errors.log" )
Variables ¶
var ( // Timeout in seconds for waiting to open a datastore for exclusive access. TimeoutSecs int = 0 // GzipAPI turns on gzip compression on REST API responses. // For high bandwidth networks or local use, it is better to leave gzip // off because delay due to compression is frequently higher than gains // from decreased response size. GzipAPI = false )
Functions ¶
func ServerlessDo ¶
ServerlessDo runs a command locally, opening and closing a datastore as necessary.
Types ¶
type RPCConnection ¶
type RPCConnection struct{}
RPCConnection will export all of its functions for rpc access.
type Service ¶
type Service struct { // The currently opened DVID datastore *datastore.Service // Error log directory ErrorLogDir string // The address of the web server WebAddress string // The path to the DVID web client WebClientPath string // The address of the rpc server RPCAddress string }
Service holds information on the servers attached to a DVID datastore.
func DataService ¶
func DataService() *Service
DataService returns the current datastore service. One DVID process is assigned to one datastore service, although it may be possible to have multiple (polyglot) persistence backends attached to that one service.
func OpenDatastore ¶
OpenDatastore returns a Server service. Only one datastore can be opened for any server.
func (*Service) Serve ¶
Serve opens a datastore then creates both web and rpc servers for the datastore. This function must be called for DataService() to be non-nil.
func (*Service) ServeHttp ¶
Listen and serve HTTP requests using address and don't let stay-alive connections hog goroutines for more than an hour. See for discussion: http://stackoverflow.com/questions/10971800/golang-http-server-leaving-open-goroutines
type Subvolume ¶
type Subvolume struct { Dataset *string `protobuf:"bytes,1,req,name=dataset" json:"dataset,omitempty"` OffsetX *int32 `protobuf:"varint,2,req,name=offsetX" json:"offsetX,omitempty"` OffsetY *int32 `protobuf:"varint,3,req,name=offsetY" json:"offsetY,omitempty"` OffsetZ *int32 `protobuf:"varint,4,req,name=offsetZ" json:"offsetZ,omitempty"` SizeX *uint32 `protobuf:"varint,5,req,name=sizeX" json:"sizeX,omitempty"` SizeY *uint32 `protobuf:"varint,6,req,name=sizeY" json:"sizeY,omitempty"` SizeZ *uint32 `protobuf:"varint,7,req,name=sizeZ" json:"sizeZ,omitempty"` Data []byte `protobuf:"bytes,8,opt,name=data" json:"data,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*Subvolume) GetDataset ¶
func (*Subvolume) GetOffsetX ¶
func (*Subvolume) GetOffsetY ¶
func (*Subvolume) GetOffsetZ ¶
func (*Subvolume) ProtoMessage ¶
func (*Subvolume) ProtoMessage()
type Terminal ¶
type Terminal struct {
// contains filtered or unexported fields
}
Terminal provides a stateful client for DVID interaction. Unlike using DVID commands from the shell, terminal use keeps several DVID values (e.g., rpc address, image version UUID) in memory and provides them automatically to the DVID server.
func NewTerminal ¶
NewTerminal returns a terminal with an RPC connection to the given rpcAddress.