zerodisk

package module
v1.1.0-alpha-4 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2017 License: Apache-2.0 Imports: 3 Imported by: 20

README

Zero-OS 0-Disk Build Status

This repository implements the components required for supporting block storage in Zero-OS nodes.

The Zero-OS block storage components allow you to create and use block devices (vdisks) from within virtual machines hosted on a Zero-OS node.

A vdisk can be deduped, have various block sizes and depending on the underlying storage cluster, have different speed characteristics.

Components:

  • NBD Server
    • A network block device server to expose the vdisks to virtual machines
  • TLOG Server
    • A transaction log server to record block changes
  • Command Line Tool
    • A command line tool to control vdisks

Make sure to have Golang version 1.8 or above installed.

More

All documentation is in the /docs directory, including a table of contents.

In Getting Started with NBD Server you find the recommended path to quickly get up and running.

Documentation

Index

Constants

View Source
const (
	//HashSize is the length of a hash in bytes
	HashSize = 32
)

Variables

View Source
var (
	// CurrentVersion represents the current global
	// version of the zerodisk modules
	CurrentVersion = NewVersion(1, 1, 0, VersionStageAlpha)
)
View Source
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

func HashBytes

func HashBytes(data []byte) Hash

HashBytes takes a byte slice .

func NewHash

func NewHash() (hash Hash)

NewHash initializes a new empty hash

func (Hash) Bytes

func (h Hash) Bytes() []byte

Bytes returns the hash as a slice of bytes

func (Hash) Equals

func (h Hash) Equals(compareTo Hash) bool

Equals returns true if two hashes are the same

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

func (v Version) Compare(other Version) int

Compare returns an integer comparing this version with another version. { lt=-1 ; eq=0 ; gt=1 }

func (Version) String

func (v Version) String() string

String returns the string version of this Tlog Version

func (Version) UInt32

func (v Version) UInt32() uint32

UInt32 returns the integral version of this Tlog Version

type VersionStage

type VersionStage uint8

VersionStage defines the stage of the version

const (
	VersionStageLive VersionStage = 1 << iota
	VersionStageRC
	VersionStageBeta
	VersionStageAlpha
	VersionStageDev
)

The different version stages

Jump to

Keyboard shortcuts

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