Documentation ¶
Index ¶
Constants ¶
View Source
const AddrSize = 20
View Source
const BlockSize = 1 << 18
BlockSize is the exact size of one block in the CAS, in bytes.
Why 2**18? Because the most common SSD erase block sizes are 128KiB and 256KiB, and we want to avoid the fragmentation that results at granularities smaller than an erase block.
View Source
const BlockSizeHuman = "256KiB"
BlockSizeHuman is an expression of BlockSize in human units.
View Source
const URL = "https://github.com/cloud9-tools/go-cas"
View Source
const Version = "(unreleased)"
Variables ¶
View Source
var ErrBadDialSpec = errors.New("bad dial spec; must start with 'tcp:' or 'unix:'")
View Source
var ErrBlockTooLong = errors.New("go-cas: block is too long")
Functions ¶
func ShowVersion ¶
func ShowVersion()
Types ¶
type Addr ¶
Addr is the "address" (hash) of a CAS block.
type Block ¶
Block is a single CAS block. Size information is not preserved. To store large objects, split them into multiple CAS blocks.
type VersionFlag ¶
type VersionFlag struct{}
func (VersionFlag) Get ¶
func (_ VersionFlag) Get() interface{}
func (VersionFlag) IsBoolFlag ¶
func (_ VersionFlag) IsBoolFlag() bool
func (VersionFlag) Set ¶
func (_ VersionFlag) Set(str string) error
func (VersionFlag) String ¶
func (_ VersionFlag) String() string
Click to show internal directories.
Click to hide internal directories.