Documentation ¶
Index ¶
Constants ¶
const (
VERSION = "0.3.3"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveHosts ¶
type ActiveHosts struct {
Hosts []modules.HostSettings
}
ActiveHosts is the struct that pads the response to the hostdb module call "ActiveHosts". The padding is used so that the return value can have an explicit name, which makes adding or removing fields easier in the future.
type ConsensusInfo ¶
type DownloadInfo ¶
type DownloadInfo struct { StartTime time.Time Complete bool Filesize uint64 Received uint64 Destination string Nickname string }
DownloadInfo is a helper struct for the downloadqueue API call.
type FileInfo ¶
type FileInfo struct { Available bool UploadProgress float32 Nickname string Repairing bool TimeRemaining types.BlockHeight }
FileInfo is a helper struct for the files API call.
type GatewayInfo ¶
type GatewayInfo struct { Address modules.NetAddress Peers []modules.NetAddress }
type ModuleDeadlockStatus ¶
type ModuleDeadlockStatus struct { State bool Gateway bool Host bool HostDB bool Miner bool Renter bool TransactionPool bool Wallet bool }
ModuleDeadlockStatus is a struct containing a bool for each module, 'false' indicating that the module is deadlocked and 'true' indicating that the module is not deadlocked.
type RenterFilesLoadResponse ¶
type RenterFilesLoadResponse struct {
FilesAdded []string
}
LoadedFiles lists files that were loaded into the renter.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
A Server is essentially a collection of modules and an API server to talk to them all.
func NewServer ¶
func NewServer(APIaddr string, s *consensus.State, g modules.Gateway, h modules.Host, hdb modules.HostDB, m modules.Miner, r modules.Renter, tp modules.TransactionPool, w modules.Wallet) (*Server, error)
NewServer creates a new API server from the provided modules.
func (*Server) ReceiveConsensusSetUpdate ¶ added in v0.3.2
func (srv *Server) ReceiveConsensusSetUpdate(cc modules.ConsensusChange)
ReceiveConsensusSetUpdate gets called by the consensus set every time there is a change to the blockchain.
type SiaConstants ¶
type SiaConstants struct { BlockSizeLimit uint64 BlockFrequency types.BlockHeight TargetWindow types.BlockHeight MedianTimestampWindow int FutureThreshold types.Timestamp SiafundCount uint64 SiafundPortion float64 InitialCoinbase uint64 MinimumCoinbase uint64 MaturityDelay types.BlockHeight GenesisTimestamp types.Timestamp GenesisSiafundUnlockHash types.UnlockHash GenesisClaimUnlockHash types.UnlockHash RootTarget types.Target RootDepth types.Target MaxAdjustmentUp *big.Rat MaxAdjustmentDown *big.Rat CoinbaseAugment *big.Int }
SiaConstants is a struct listing all of the constants in use.