Documentation ¶
Index ¶
Constants ¶
const (
//HashSize is the length of a hash in bytes
HashSize = 32
)
Variables ¶
var ( // CurrentVersion represents the current global // version of the zerodisk modules CurrentVersion = NewVersion(1, 1, 0, VersionStageAlpha) )
var ( //NilHash is a hash with only '0'bytes NilHash = NewHash() )
Functions ¶
This section is empty.
Types ¶
type Hash ¶
type Hash []byte
Hash is just a bytearray of size HashSize
type Hasher ¶
Hasher is the crypto hasher interface used, for all zerodisk crypto-hash purposes, where we want to reuse a hasher for some reason.
func NewHasher ¶
NewHasher returns a new instance of the default hasher used in 0-Disk, using the given key.
func NewKeyedHasher ¶
NewKeyedHasher returns a new instance of the default keyed hasher used in 0-Disk, using the given key.
type Version ¶
type Version uint32
Version defines the semantic version, used by Client and Server.
func NewVersion ¶
func NewVersion(major, minor, patch uint8, stage VersionStage) Version
NewVersion creates a new version
func (Version) Compare ¶
Compare returns an integer comparing this version with another version. { lt=-1 ; eq=0 ; gt=1 }
type VersionStage ¶
type VersionStage uint8
VersionStage defines the stage of the version. This type can also be used to cast a Version to a VersionStage.
const ( VersionStageLive VersionStage = 1 << iota VersionStageRC VersionStageBeta VersionStageAlpha VersionStageDev )
The different version stages
Directories ¶
Path | Synopsis |
---|---|
docs
|
|
Package log defines a complete logging API and is to be used for all 0-Disk info/error logging purposes.
|
Package log defines a complete logging API and is to be used for all 0-Disk info/error logging purposes. |
nbd
|
|
Package redisstub is a minimal package providing redis-related (in-memory) implementations meant for testing and dev purposes only.
|
Package redisstub is a minimal package providing redis-related (in-memory) implementations meant for testing and dev purposes only. |
tools
|
|