Documentation ¶
Index ¶
- Constants
- Variables
- func From(typ interface{}) interface{}
- type FullOption
- type Option
- func ApplyIf(check func(s *Settings) bool, opts ...Option) Option
- func ConfigCommon(cfg *config.Common) Option
- func ConfigFullNode(c interface{}) Option
- func ConfigStorageMiner(c interface{}) Option
- func Error(err error) Option
- func FullAPI(out *api.FullNode, fopts ...FullOption) Option
- func If(b bool, opts ...Option) Option
- func MockHost(mn mocknet.Mocknet) Option
- func Online() Option
- func Options(opts ...Option) Option
- func Override(typ, constructor interface{}) Option
- func Repo(r repo.Repo) Option
- func StorageMiner(out *api.StorageMiner) Option
- func Test() Option
- func Unset(typ interface{}) Option
- type Settings
- type StopFunc
Constants ¶
View Source
const ( // InitJournal at position 0 initializes the journal global var as soon as // the system starts, so that it's available for all other components. InitJournalKey = invoke(iota) PstoreAddSelfKeysKey StartListeningKey BootstrapKey // filecoin SetGenesisKey RunHelloKey RunChainExchangeKey RunChainGraphsync RunPeerMgrKey HandleIncomingBlocksKey HandleIncomingMessagesKey HandleMigrateClientFundsKey HandlePaymentChannelManagerKey // miner GetParamsKey HandleMigrateProviderFundsKey HandleDealsKey HandleRetrievalKey RunSectorServiceKey // daemon ExtractApiKey HeadMetricsKey SettlePaymentChannelsKey RunPeerTaggerKey SetupFallbackBlockstoreKey SetApiEndpointKey )
Invokes are called in the order they are defined.
Variables ¶
View Source
var ( DefaultTransportsKey = special{0} // Libp2p option DiscoveryHandlerKey = special{2} // Private type AddrsFactoryKey = special{3} // Libp2p option SmuxTransportKey = special{4} // Libp2p option RelayKey = special{5} // Libp2p option SecurityKey = special{6} // Libp2p option BaseRoutingKey = special{7} // fx groups + multiret NatPortMapKey = special{8} // Libp2p option ConnectionManagerKey = special{9} // Libp2p option AutoNATSvcKey = special{10} // Libp2p option BandwidthReporterKey = special{11} // Libp2p option ConnGaterKey = special{12} // libp2p option )
Functions ¶
Types ¶
type FullOption ¶ added in v0.9.1
type FullOption = Option
func Lite ¶ added in v0.9.1
func Lite(enable bool) FullOption
type Option ¶
Option is a functional option which can be used with the New function to change how the node is constructed
Options are applied in sequence
func ConfigCommon ¶
Config sets up constructors based on the provided Config
func ConfigFullNode ¶
func ConfigFullNode(c interface{}) Option
func ConfigStorageMiner ¶
func ConfigStorageMiner(c interface{}) Option
func Override ¶
func Override(typ, constructor interface{}) Option
Override option changes constructor for a given type
func StorageMiner ¶
func StorageMiner(out *api.StorageMiner) Option
Click to show internal directories.
Click to hide internal directories.