Versions in this module Expand all Collapse all v1 v1.0.1 Mar 1, 2020 Changes in this version + const PersistFilename + const PersistStorageHostManagerHeader + const PersistStorageHostManagerVersion + type EvaluationDetail struct + ContractPriceScore float64 + DepositScore float64 + Evaluation int64 + InteractionScore float64 + PresenceScore float64 + StorageRemainingScore float64 + UptimeScore float64 + type FilterMode int + const BlacklistFilter + const DisableFilter + const WhitelistFilter + func ToFilterMode(fm string) (filterMode FilterMode, err error) + func (fm FilterMode) String() string + type HostEvaluator interface + Evaluate func(info storage.HostInfo) int64 + EvaluateDetail func(info storage.HostInfo) EvaluationDetail + type InteractionType uint8 + const InteractionCreateContract + const InteractionDownload + const InteractionGetConfig + const InteractionInvalid + const InteractionRenewContract + const InteractionUpload + func InteractionNameToType(name string) InteractionType + func (it InteractionType) String() string + type PrivateStorageHostManagerAPI struct + func NewPrivateStorageHostManagerAPI(shm *StorageHostManager) *PrivateStorageHostManagerAPI + func (api *PrivateStorageHostManagerAPI) SetFilterMode(fm string, hostInfos []enode.ID) (resp string, err error) + type PublicHostManagerDebugAPI struct + func NewPublicStorageClientDebugAPI(shm *StorageHostManager) *PublicHostManagerDebugAPI + func (api *PublicHostManagerDebugAPI) BlockHeight() uint64 + func (api *PublicHostManagerDebugAPI) InsertActiveHostInfo(amount int) string + func (api *PublicHostManagerDebugAPI) InsertHostInfo(amount int) string + func (api *PublicHostManagerDebugAPI) InsertHostInfoHighEval(id enode.ID) (err error) + func (api *PublicHostManagerDebugAPI) InsertHostInfoIPTime(amount int, id enode.ID, ip string, ipChanged time.Time) (err error) + func (api *PublicHostManagerDebugAPI) InsertHostInfoLowEval(id enode.ID) (err error) + func (api *PublicHostManagerDebugAPI) Online() bool + func (api *PublicHostManagerDebugAPI) RetrieveRentPaymentInfo() (rentPayment storage.RentPayment) + func (api *PublicHostManagerDebugAPI) Syncing() bool + type PublicStorageHostManagerAPI struct + func NewPublicStorageHostManagerAPI(shm *StorageHostManager) *PublicStorageHostManagerAPI + func (api *PublicStorageHostManagerAPI) ActiveStorageHosts() (activeStorageHosts []storage.HostInfo) + func (api *PublicStorageHostManagerAPI) AllStorageHosts() (allStorageHosts []storage.HostInfo) + func (api *PublicStorageHostManagerAPI) FilterMode() (fm string) + func (api *PublicStorageHostManagerAPI) FilteredHosts() (allFiltered []storage.HostInfo) + func (api *PublicStorageHostManagerAPI) StorageHost(id string) storage.HostInfo + func (api *PublicStorageHostManagerAPI) StorageHostRanks() (rankings []StorageHostRank) + type StorageHostManager struct + func New(persistDir string) *StorageHostManager + func (shm *StorageHostManager) ActiveStorageHosts() (activeStorageHosts []storage.HostInfo) + func (shm *StorageHostManager) AllHosts() []storage.HostInfo + func (shm *StorageHostManager) Close() error + func (shm *StorageHostManager) Evaluate(host storage.HostInfo) int64 + func (shm *StorageHostManager) FilterIPViolationHosts(hostIDs []enode.ID) (badHostIDs []enode.ID) + func (shm *StorageHostManager) GetMarketPrice() storage.MarketPrice + func (shm *StorageHostManager) IncrementFailedInteractions(id enode.ID, interactionType InteractionType) + func (shm *StorageHostManager) IncrementSuccessfulInteractions(id enode.ID, interactionType InteractionType) + func (shm *StorageHostManager) RetrieveFilterMode() (fm string) + func (shm *StorageHostManager) RetrieveHostInfo(id enode.ID) (hi storage.HostInfo, exists bool) + func (shm *StorageHostManager) RetrieveIPViolationCheckSetting() (violationCheck bool) + func (shm *StorageHostManager) RetrieveRandomHosts(num int, blacklist, addrBlacklist []enode.ID) (infos []storage.HostInfo, err error) + func (shm *StorageHostManager) RetrieveRentPayment() (rent storage.RentPayment) + func (shm *StorageHostManager) SetFilterMode(fm FilterMode, hostInfo []enode.ID) error + func (shm *StorageHostManager) SetIPViolationCheck(violationCheck bool) + func (shm *StorageHostManager) SetRentPayment(rent storage.RentPayment) (err error) + func (shm *StorageHostManager) Start(b storage.ClientBackend) error + func (shm *StorageHostManager) StorageHostRanks() (rankings []StorageHostRank) + type StorageHostRank struct + EnodeID string