Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDispatcher ¶
func NewDispatcher(s *service) *dispatcher
func NewService ¶
func NewService(ctx *context.T, opts ServiceOptions) (*service, error)
NewService creates a new service instance and returns it. TODO(sadovsky): If possible, close all stores when the server is stopped.
func PermsString ¶
func PermsString(ctx *context.T, perms access.Permissions) string
PermsString returns a JSON-based string representation of the permissions.
Types ¶
type DatabaseData ¶
type DatabaseData struct { Id syncbase.Id Version uint64 // covers the Perms field below Perms access.Permissions SchemaMetadata *syncbase.SchemaMetadata }
DatabaseData represents the persistent state of a Database, stored in the per-database storage engine.
func (*DatabaseData) GetPerms ¶
func (data *DatabaseData) GetPerms() access.Permissions
func (DatabaseData) VDLIsZero ¶
func (x DatabaseData) VDLIsZero() bool
func (DatabaseData) VDLReflect ¶
func (DatabaseData) VDLReflect(struct { Name string `vdl:"v.io/x/ref/services/syncbase/server.DatabaseData"` })
type DatabaseOptions ¶
type DatabaseOptions struct { // Database-level permissions. Perms access.Permissions // Root dir for data storage. This path is relative from the service's RootDir. RootDir string // Storage engine to use. Engine string }
DatabaseOptions configures a database.
type DbInfo ¶
type DbInfo struct { Id syncbase.Id // Select fields from DatabaseOptions, needed in order to open storage engine // on restart. RootDir string // interpreted by storage engine Engine string // name of storage engine, e.g. "leveldb" }
DbInfo contains information about a single Database, stored in the service-level storage engine.
func (DbInfo) VDLReflect ¶
type ServiceData ¶
type ServiceData struct { Version uint64 // covers the fields below Perms access.Permissions }
ServiceData represents the persistent state of a Service.
func (*ServiceData) GetPerms ¶
func (data *ServiceData) GetPerms() access.Permissions
func (ServiceData) VDLIsZero ¶
func (x ServiceData) VDLIsZero() bool
func (ServiceData) VDLReflect ¶
func (ServiceData) VDLReflect(struct { Name string `vdl:"v.io/x/ref/services/syncbase/server.ServiceData"` })
type ServiceOptions ¶
type ServiceOptions struct { // Service-level permissions. Used only when creating a brand new storage // instance. Perms access.Permissions // Root dir for data storage. If empty, we write to a fresh directory created // using ioutil.TempDir. RootDir string // Storage engine to use: memstore or leveldb. If empty, we use the default // storage engine, currently leveldb. Engine string // Whether to skip publishing in the neighborhood. SkipPublishInNh bool // Whether to run in development mode; required for RPCs such as // Service.DevModeUpdateVClock. DevMode bool // InitialDB, if not blank, specifies an initial database to create when // creating a brand new storage instance. InitialDB wire.Id }
ServiceOptions configures a service.
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Package filter contains filter implementations for matching collections and rows within them.
|
Package filter contains filter implementations for matching collections and rows within them. |
Package interfaces defines internal interfaces for various objects in the Syncbase server implementation.
|
Package interfaces defines internal interfaces for various objects in the Syncbase server implementation. |
Click to show internal directories.
Click to hide internal directories.