Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForEachAnnouncement ¶
ForEachAnnouncement calls fn on each host announcement in a block.
Types ¶
type Announcement ¶
type Announcement struct { Index types.ChainIndex Timestamp time.Time NetAddress string }
Announcement represents a host announcement in a given block.
type Host ¶
type Host struct { KnownSince time.Time `json:"knownSince"` LastAnnouncement time.Time `json:"lastAnnouncement"` PublicKey types.PublicKey `json:"publicKey"` NetAddress string `json:"netAddress"` PriceTable HostPriceTable `json:"priceTable"` Settings rhpv2.HostSettings `json:"settings"` Interactions Interactions `json:"interactions"` Scanned bool `json:"scanned"` }
A Host pairs a host's public key with a set of interactions.
func (Host) IsAnnounced ¶
IsAnnounced returns whether the host has been announced.
type HostAddress ¶
type HostAddress struct { PublicKey types.PublicKey `json:"publicKey"` NetAddress string `json:"netAddress"` }
HostAddress contains the address of a specific host identified by a public key.
type HostInfo ¶
HostInfo extends the host type with a field indicating whether it is blocked or not.
type HostPriceTable ¶
type HostPriceTable struct { rhpv3.HostPriceTable Expiry time.Time `json:"expiry"` }
A HostPriceTable extends the host price table with its expiry.
type HostScan ¶
type HostScan struct { HostKey types.PublicKey `json:"hostKey"` Success bool Timestamp time.Time Settings rhpv2.HostSettings PriceTable rhpv3.HostPriceTable }
type Interactions ¶
type Interactions struct { TotalScans uint64 `json:"totalScans"` LastScan time.Time `json:"lastScan"` LastScanSuccess bool `json:"lastScanSuccess"` LostSectors uint64 `json:"lostSectors"` SecondToLastScanSuccess bool `json:"secondToLastScanSuccess"` Uptime time.Duration `json:"uptime"` Downtime time.Duration `json:"downtime"` SuccessfulInteractions float64 `json:"successfulInteractions"` FailedInteractions float64 `json:"failedInteractions"` }
Interactions contains metadata about a host's interactions.
type PriceTableUpdate ¶
Click to show internal directories.
Click to hide internal directories.