api

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2015 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
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 ConsensusInfo struct {
	Height       types.BlockHeight
	CurrentBlock types.BlockID
	Target       types.Target
}

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

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.

func (*Server) Serve

func (srv *Server) Serve() error

Serve listens for and handles API calls. It a blocking function.

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.

type UpdateInfo

type UpdateInfo struct {
	Available bool
	Version   string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL