Versions in this module Expand all Collapse all v1 v1.0.1 Mar 1, 2020 Changes in this version + const PersistContractManagerHeader + const PersistContractManagerVersion + const PersistFileName + var ErrHostFault = errors.New("host has returned an error") + func ClientPayouts(host storage.HostInfo, funding common.BigInt, basePrice common.BigInt, ...) (clientPayout common.BigInt, hostPayout common.BigInt, ...) + func PubkeyToEnodeID(pubkey *ecdsa.PublicKey) enode.ID + func RentPaymentValidation(rent storage.RentPayment) (err error) + type ContractManager struct + func New(persistDir string, hm *storagehostmanager.StorageHostManager) (cm *ContractManager, err error) + func (cm *ContractManager) AcquireRentPayment() (rentPayment storage.RentPayment) + func (cm *ContractManager) CalculatePeriodCost(rentPayment storage.RentPayment) (periodCost storage.PeriodCost) + func (cm *ContractManager) ContractCreate(params storage.ContractParams) (md storage.ContractMetaData, err error) + func (cm *ContractManager) ContractRenew(oldContract *contractset.Contract, params storage.ContractParams) (md storage.ContractMetaData, err error) + func (cm *ContractManager) GetStorageContractSet() (contractSet *contractset.StorageContractSet) + func (cm *ContractManager) HostHealthMap() (infoTable storage.HostHealthInfoTable) + func (cm *ContractManager) HostHealthMapByID(hostIDs []enode.ID) (infoTable storage.HostHealthInfoTable) + func (cm *ContractManager) InsertRandomActiveContracts(amount int) (err error) + func (cm *ContractManager) RetrieveActiveContract(contractID storage.ContractID) (contract storage.ContractMetaData, exists bool) + func (cm *ContractManager) RetrieveActiveContracts() (cms []storage.ContractMetaData) + func (cm *ContractManager) RetrievePeriodCost() storage.PeriodCost + func (cm *ContractManager) RetrieveRateLimit() (readBPS, writeBPS int64, packetSize uint64) + func (cm *ContractManager) SetRateLimits(readBPS int64, writeBPS int64, packetSize uint64) + func (cm *ContractManager) SetRentPayment(rent storage.RentPayment, market hostMarket) (err error) + func (cm *ContractManager) Start(b storage.ClientBackend) (err error) + func (cm *ContractManager) Stop()