Documentation
¶
Overview ¶
Package host is an implementation of the host module, and is responsible for participating in the storage ecosystem, turning available disk space an internet bandwidth into profit for the user.
Index ¶
- type Host
- func (h *Host) Announce() error
- func (h *Host) AnnounceAddress(addr modules.NetAddress) error
- func (h *Host) Close() error
- func (h *Host) ExternalSettings() modules.HostExternalSettings
- func (h *Host) FinancialMetrics() modules.HostFinancialMetrics
- func (h *Host) InternalSettings() modules.HostInternalSettings
- func (h *Host) NetAddress() modules.NetAddress
- func (h *Host) NetworkMetrics() modules.HostNetworkMetrics
- func (h *Host) ProcessConsensusChange(cc modules.ConsensusChange)
- func (h *Host) SetInternalSettings(settings modules.HostInternalSettings) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Host ¶
type Host struct {
modules.StorageManager
// contains filtered or unexported fields
}
A Host contains all the fields necessary for storing files for clients and performing the storage proofs on the received files.
func New ¶
func New(cs modules.ConsensusSet, tpool modules.TransactionPool, wallet modules.Wallet, address string, persistDir string) (*Host, error)
New returns an initialized Host.
func (*Host) Announce ¶
Announce creates a host announcement transaction, adding information to the arbitrary data, signing the transaction, and submitting it to the transaction pool.
func (*Host) AnnounceAddress ¶
func (h *Host) AnnounceAddress(addr modules.NetAddress) error
AnnounceAddress submits a host announcement to the blockchain to announce a specific address. No checks for validity are performed on the address.
func (*Host) ExternalSettings ¶
func (h *Host) ExternalSettings() modules.HostExternalSettings
ExternalSettings returns the hosts external settings. These values cannot be set by the user (host is configured through InternalSettings), and are the values that get displayed to other hosts on the network.
func (*Host) FinancialMetrics ¶
func (h *Host) FinancialMetrics() modules.HostFinancialMetrics
FinancialMetrics returns information about the financial commitments, rewards, and activities of the host.
func (*Host) InternalSettings ¶
func (h *Host) InternalSettings() modules.HostInternalSettings
InternalSettings returns the settings of a host.
func (*Host) NetAddress ¶
func (h *Host) NetAddress() modules.NetAddress
NetAddress returns the address at which the host can be reached.
func (*Host) NetworkMetrics ¶
func (h *Host) NetworkMetrics() modules.HostNetworkMetrics
NetworkMetrics returns information about the types of rpc calls that have been made to the host.
func (*Host) ProcessConsensusChange ¶
func (h *Host) ProcessConsensusChange(cc modules.ConsensusChange)
ProcessConsensusChange will be called by the consensus set every time there is a change to the blockchain.
func (*Host) SetInternalSettings ¶
func (h *Host) SetInternalSettings(settings modules.HostInternalSettings) error
SetInternalSettings updates the host's internal HostInternalSettings object.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
package storagemanager implements a storage manager for the host on Sia.
|
package storagemanager implements a storage manager for the host on Sia. |