Documentation
¶
Index ¶
Constants ¶
View Source
const ( HOT = iota COLD )
View Source
const ( ReadOK = 400 + iota ReadEOF )
error code
View Source
const ( STABLE = 111 + iota UNSTABLE )
Status
View Source
const ( ReplicaNum = 2 ColdReplicaNum = 1 BlockSize = 1 << 19 // 512KB HeartBeatInterval = 500 * time.Millisecond GarbageCollectionInterval = 30 * time.Second // temp HeartBeatTimeout = 5 * time.Second HealthCheckInterval = 4 * HeartBeatInterval ExpireInterval = 60 * time.Second // temp RearrangeInterval = 2 * HealthCheckInterval ExpireTime = 3 * time.Minute MaxRetry = 3 )
config
Variables ¶
This section is empty.
Functions ¶
func GenerateRandomData ¶
func GetGoroutineID ¶
func GetGoroutineID() uint64
Types ¶
type BlockHandle ¶
type BlockHandle uint64
type BlockIndex ¶
type BlockIndex int32
type BlockVersion ¶
type BlockVersion int32
type Node ¶
type Node struct {
Blocks map[BlockHandle]bool
Garbage []BlockHandle
LastBeat time.Time
}
type NodeAddress ¶
type NodeAddress string
func RemoveAddress ¶
func RemoveAddress(nodeList []NodeAddress, target NodeAddress) ([]NodeAddress, error)
Click to show internal directories.
Click to hide internal directories.