Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Lockfile is the filesystem lock filename. Export for external utilities. LockFilename = ".lock" // LockDuration is the maximum lock time duration allowed. 15 seconds // is ~3x of anchoring without internet delay. LockDuration = 15 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func DisableLog ¶
func DisableLog()
DisableLog disables all library log output. Logging output is disabled by default until either UseLogger or SetLogWriter are called.
Types ¶
type Anchor ¶
type Anchor struct {
Type AnchorType // Type of anchor this record represents
Time int64 // OS time when record was created
Digests [][]byte // All digests that were merkled to get to key of record
Messages []string // All one-line Commit messages
}
type AnchorType ¶
type AnchorType uint32
AnchorType discriminates between the various Anchor record types.
const ( AnchorInvalid AnchorType = 0 // Invalid anchor AnchorUnverified AnchorType = 1 // Unverified anchor AnchorVerified AnchorType = 2 // Verified anchor )
type LastAnchor ¶
type LastAnchor struct {
Last []byte // Last git digest that was anchored
Time int64 // OS time when record was created
Merkle []byte // Merkle root that points to Anchor record, if valid
}
LastAnchor stores the last commit anchored in dcrtime.
type UnconfirmedAnchor ¶
type UnconfirmedAnchor struct {
Merkles [][]byte // List of Merkle root that points to Anchor records
}
UnconfirmedAnchor stores Merkle roots of anchors that have not been confirmed yet by dcrtime.
Click to show internal directories.
Click to hide internal directories.