Documentation ¶
Index ¶
- Constants
- func From(typ interface{}) interface{}
- type Option
- func ApplyIf(check func(s *Settings) bool, opts ...Option) Option
- func ConfigCommon(cfg *config.Common) Option
- func ConfigFullNode(c interface{}) Option
- func Error(err error) Option
- func FullAPI(out *api.FullNode) Option
- func If(b bool, opts ...Option) Option
- func Online() Option
- func Options(opts ...Option) Option
- func Override(typ, constructor interface{}) Option
- func Repo(r repo.Repo) Option
- func Unset(typ interface{}) Option
- type Settings
- type StopFunc
Constants ¶
View Source
const ( PstoreAddSelfKeysKey = invoke(iota) StartListeningKey BootstrapKey // daemon ExtractApiKey HeadMetricsKey RunPeerTaggerKey SetApiEndpointKey )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
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
Click to show internal directories.
Click to hide internal directories.