Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Validators = map[string]func(string, string) error{
"heartbeat.nickname": validateLettersOnly,
}
Validators hold the list of validation functions for each configuration property. Validators must take a key and json string respectively as arguments, and must return either an error or nil depending on whether or not the given key and value are valid. Validators will only be run if a property being set matches the name given in this map.
Functions ¶
This section is empty.
Types ¶
type APIConfig ¶
type APIConfig struct { Address string `json:"address"` AccessControlAllowOrigin []string `json:"accessControlAllowOrigin"` AccessControlAllowCredentials bool `json:"accessControlAllowCredentials"` AccessControlAllowMethods []string `json:"accessControlAllowMethods"` }
APIConfig holds all configuration options related to the api.
type BootstrapConfig ¶
type BootstrapConfig struct { Addresses []string `json:"addresses"` MinPeerThreshold int `json:"minPeerThreshold"` Period string `json:"period,omitempty"` }
BootstrapConfig holds all configuration options related to bootstrap nodes
type Config ¶
type Config struct { API *APIConfig `json:"api"` Bootstrap *BootstrapConfig `json:"bootstrap"` Datastore *DatastoreConfig `json:"datastore"` Swarm *SwarmConfig `json:"swarm"` Mining *MiningConfig `json:"mining"` Wallet *WalletConfig `json:"wallet"` Heartbeat *HeartbeatConfig `json:"heartbeat"` Net string `json:"net"` Metrics *MetricsConfig `json:"metrics"` Mpool *MessagePoolConfig `json:"mpool"` }
Config is an in memory representation of the filecoin configuration file
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
NewDefaultConfig returns a config object with all the fields filled out to their default values
type DatastoreConfig ¶
DatastoreConfig holds all the configuration options for the datastore. TODO: use the advanced datastore configuration from ipfs
type HeartbeatConfig ¶
type HeartbeatConfig struct { // BeatTarget represents the address the filecoin node will send heartbeats to. BeatTarget string `json:"beatTarget"` // BeatPeriod represents how frequently heartbeats are sent. // Golang duration units are accepted. BeatPeriod string `json:"beatPeriod"` // ReconnectPeriod represents how long the node waits before attempting to reconnect. // Golang duration units are accepted. ReconnectPeriod string `json:"reconnectPeriod"` // Nickname represents the nickname of the filecoin node, Nickname string `json:"nickname"` }
HeartbeatConfig holds all configuration options related to node heartbeat.
type MessagePoolConfig ¶
type MessagePoolConfig struct { // MaxPoolSize is the maximum number of pending messages will will allow in the message pool at any time MaxPoolSize int `json:"maxPoolSize"` // MaxNonceGap is the maximum nonce of a message past the last received on chain MaxNonceGap types.Uint64 `json:"maxNonceGap"` }
MetricsConfig holds all configuration options related to nodes message pool (mpool).
type MetricsConfig ¶
type MetricsConfig struct { // Enabled will enable prometheus metrics when true. PrometheusEnabled bool `json:"prometheusEnabled"` // ReportInterval represents how frequently filecoin will update its prometheus metrics. ReportInterval string `json:"reportInterval"` // PrometheusEndpoint represents the address filecoin will expose prometheus metrics at. PrometheusEndpoint string `json:"prometheusEndpoint"` }
MetricsConfig holds all configuration options related to node metrics.
type MiningConfig ¶
type MiningConfig struct { MinerAddress address.Address `json:"minerAddress"` AutoSealIntervalSeconds uint `json:"autoSealIntervalSeconds"` StoragePrice *types.AttoFIL `json:"storagePrice"` }
MiningConfig holds all configuration options related to mining.
type SwarmConfig ¶
type SwarmConfig struct { Address string `json:"address"` PublicRelayAddress string `json:"public_relay_address,omitempty"` }
SwarmConfig holds all configuration options related to the swarm.
type WalletConfig ¶
WalletConfig holds all configuration options related to the wallet.