qlease

package
v0.0.0-...-f965b87 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2014 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_LEASE_DURATION_NS = 2000 * 1e6 // 2000 ms
View Source
const GUARD_DURATION_NS = 1 * 1e9 // 1 second

Variables

This section is empty.

Functions

This section is empty.

Types

type Lease

type Lease struct {
	PromisedByMeInst       int32 // the current lease instance for which we've sent promises
	PromisedToMeInst       int32 // the lease instance for which we've received promises
	Duration               int64
	LatestTsSent           int64
	LatestPromisesReceived []int64
	LatestRepliesReceived  []int64
	ReadLocallyUntil       int64
	WriteInQuorumUntil     int64
	PromiseRejects         int
	GuardExpires           []int64
}

func NewLease

func NewLease(n int) *Lease

func (*Lease) CanRead

func (ql *Lease) CanRead() bool

func (*Lease) CanWriteOutside

func (ql *Lease) CanWriteOutside() bool

Jump to

Keyboard shortcuts

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