Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
DaemonName = "rivine"
)
DaemonName sets the name of the daemon, used in some help messages
Functions ¶
func SetupDefaultDaemon ¶ added in v0.1.2
func SetupDefaultDaemon(cfg RivinedCfg)
SetupDefaultDaemon sets up and starts a default daemon. The chain options and constants need to be configured prior to this. This function does not return untill the daemon is stopped
Types ¶
type Config ¶
type Config struct {
// The APIPassword is input by the user after the daemon starts up, if the
// --authenticate-api flag is set.
APIPassword string
// The Rivined variables are referenced directly by cobra, and are set
// according to the flags.
Rivined RivinedCfg
}
The Config struct contains all configurable variables for siad. It is compatible with gcfg.
type DaemonVersion ¶
type DaemonVersion struct {
Version string `json:"version"`
}
type RivinedCfg ¶ added in v0.1.2
type RivinedCfg struct {
APIaddr string
RPCaddr string
HostAddr string
AllowAPIBind bool
Modules string
NoBootstrap bool
RequiredUserAgent string
AuthenticateAPI bool
Profile bool
ProfileDir string
RivineDir string
}
RivinedCfg holds variables referenced by cobra and set by flags
func DefaultConfig ¶ added in v0.1.2
func DefaultConfig() RivinedCfg
DefaultConfig returns the default daemon configuration
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server creates and serves a HTTP server that offers communication with a Sia API.
func NewServer ¶
NewServer creates a new net.http server listening on bindAddr. Only the /daemon/ routes are registered by this func, additional routes can be registered later by calling serv.mux.Handle.
type SiaConstants ¶
type SiaConstants struct {
GenesisTimestamp types.Timestamp `json:"genesistimestamp"`
BlockSizeLimit uint64 `json:"blocksizelimit"`
BlockFrequency types.BlockHeight `json:"blockfrequency"`
TargetWindow types.BlockHeight `json:"targetwindow"`
MedianTimestampWindow uint64 `json:"mediantimestampwindow"`
FutureThreshold types.Timestamp `json:"futurethreshold"`
BlockStakeCount types.Currency `json:"blockstakecount"`
MaturityDelay types.BlockHeight `json:"maturitydelay"`
RootTarget types.Target `json:"roottarget"`
RootDepth types.Target `json:"rootdepth"`
MaxAdjustmentUp *big.Rat `json:"maxadjustmentup"`
MaxAdjustmentDown *big.Rat `json:"maxadjustmentdown"`
OneCoin types.Currency `json:"onecoin"`
}
SiaConstants is a struct listing all of the constants in use.
type UpdateInfo ¶
UpdateInfo indicates whether an update is available, and to what version.