Versions in this module Expand all Collapse all v1 v1.0.1 Mar 1, 2020 Changes in this version + const HostSettingFile + const PersistHostDir + const StorageManager + const Version + func ContractCreateHandler(h *StorageHost, sp storage.Peer, contractCreateReqMsg p2p.Msg) + func DownloadHandler(h *StorageHost, sp storage.Peer, downloadReqMsg p2p.Msg) + func ExtendErr(s string, err error) error + func UploadHandler(h *StorageHost, sp storage.Peer, uploadReqMsg p2p.Msg) + func VerifyRevision(so *StorageResponsibility, revision *types.StorageContractRevision, ...) error + type ErrorCreateContract string + func (e ErrorCreateContract) Error() string + type ErrorRevision string + func (e ErrorRevision) Error() string + type HostFinancialMetrics struct + ContractCompensation common.BigInt + ContractCount uint64 + DownloadBandwidthRevenue common.BigInt + LockedStorageDeposit common.BigInt + LostRevenue common.BigInt + LostStorageDeposit common.BigInt + PotentialContractCompensation common.BigInt + PotentialDownloadBandwidthRevenue common.BigInt + PotentialStorageRevenue common.BigInt + PotentialUploadBandwidthRevenue common.BigInt + RiskedStorageDeposit common.BigInt + StorageRevenue common.BigInt + TransactionFeeExpenses common.BigInt + UploadBandwidthRevenue common.BigInt + type HostFinancialMetricsForDisplay struct + ContractCompensation string + ContractCount uint64 + DownloadBandwidthRevenue string + LockedStorageDeposit string + LostRevenue string + LostStorageDeposit string + PotentialContractCompensation string + PotentialDownloadBandwidthRevenue string + PotentialStorageRevenue string + PotentialUploadBandwidthRevenue string + RiskedStorageDeposit string + StorageRevenue string + TransactionFeeExpenses string + UploadBandwidthRevenue string + type HostPrivateAPI struct + func NewHostPrivateAPI(storageHost *StorageHost) *HostPrivateAPI + func (h *HostPrivateAPI) AddStorageFolder(path string, sizeStr string) (string, error) + func (h *HostPrivateAPI) Announce() string + func (h *HostPrivateAPI) AvailableSpace() storage.HostSpace + func (h *HostPrivateAPI) DeleteFolder(folderPath string) (string, error) + func (h *HostPrivateAPI) Folders() []storage.HostFolder + func (h *HostPrivateAPI) GetFinancialMetrics() HostFinancialMetricsForDisplay + func (h *HostPrivateAPI) GetHostConfig() storage.HostIntConfigForDisplay + func (h *HostPrivateAPI) GetPaymentAddress() string + func (h *HostPrivateAPI) GetProofWindow() string + func (h *HostPrivateAPI) PersistDir() string + func (h *HostPrivateAPI) ResizeFolder(folderPath string, sizeStr string) (string, error) + func (h *HostPrivateAPI) SectorSize() uint64 + func (h *HostPrivateAPI) SetConfig(config map[string]string) (string, error) + func (h *HostPrivateAPI) Version() string + type StorageHost struct + func New(persistDir string) (*StorageHost, error) + func (h *StorageHost) Close() error + func (h *StorageHost) GetCurrentBlockHeight() uint64 + func (h *StorageHost) GetStorageResponsibility(storageContractID common.Hash) (StorageResponsibility, error) + func (h *StorageHost) IsContractSignedWithClient(clientNode *enode.Node) bool + func (h *StorageHost) RetrieveExternalConfig() storage.HostExtConfig + func (h *StorageHost) Start(eth storage.HostBackend) (err error) + func (h *StorageHost) UpdateContractToClientNodeMappingAndConnection() + type StorageResponsibility struct + ContractCost common.BigInt + CreateContractConfirmed bool + LockedStorageDeposit common.BigInt + NegotiationBlockNumber uint64 + OriginStorageContract types.StorageContract + PotentialDownloadRevenue common.BigInt + PotentialStorageRevenue common.BigInt + PotentialUploadRevenue common.BigInt + ResponsibilityStatus storageResponsibilityStatus + RiskedStorageDeposit common.BigInt + SectorRoots []common.Hash + StorageContractRevisions []types.StorageContractRevision + StorageProofConfirmed bool + StorageProofConstructed bool + StorageRevisionConfirmed bool + StorageRevisionConstructed bool + TransactionFeeExpenses common.BigInt + func (so *StorageResponsibility) ProofDeadline() uint64 + type TryMutex struct + func (tm *TryMutex) Lock() + func (tm *TryMutex) TryLock() bool + func (tm *TryMutex) TryLockTimed(t time.Duration) bool + func (tm *TryMutex) Unlock()