Discover Packages
github.com/vechain/solidb
spec
package
Version:
v0.0.0-...-2eec6a9
Opens a new window with list of versions in this module.
Published: Nov 13, 2017
License: LGPL-3.0
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package spec defines cluster specifications
type Entry struct {
ID string `json:"ID"`
Addr string `json:"Addr"`
Slices []string `json:"slices"`
}
Entry describes a SAT entry.
ContainsKey tests whether entry contains the key.
String returns summary of entry
type OptEntry struct {
V *Entry
}
type OptSpec struct {
V *Spec
}
OptSpec optional spec
type SAT struct {
Entries []Entry `json:"entries"`
}
SAT slice allocation table
FindEntry find entry by ID
Locate find out all entries containing the key
type Spec struct {
Revision int `json:"revision"`
SAT SAT `json:"sat"`
}
Spec contains all information of cluster
Hash returns hash of spec marshaled into JSON
Validate validates spec. Returns non-nil error if not valid.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.