Documentation ¶
Index ¶
- Constants
- func Init(ctx context.Context, r repo.Repo, gen genesis.InitFunc, opts ...InitOpt) error
- func SetNetParams(params *config.NetworkParamsConfig)
- type AllInspectorInfo
- type Builder
- type BuilderOpt
- func BlockTime(blockTime time.Duration) BuilderOpt
- func ChainClockConfigOption(clk clock.ChainEpochClock) BuilderOpt
- func IsRelay() BuilderOpt
- func JournalConfigOption(jrl journal.Journal) BuilderOpt
- func Libp2pOptions(opts ...libp2p.Option) BuilderOpt
- func MonkeyPatchNetworkParamsOption(params *config.NetworkParamsConfig) BuilderOpt
- func MonkeyPatchSetProofTypeOption(proofType abi.RegisteredSealProof) BuilderOpt
- func OfflineMode(offlineMode bool) BuilderOpt
- func OptionsFromRepo(r repo.Repo) ([]BuilderOpt, error)
- func PropagationDelay(propDelay time.Duration) BuilderOpt
- func SetAuthURL(url string) BuilderOpt
- func SetWalletPassword(password []byte) BuilderOpt
- func VerifierConfigOption(verifier ffiwrapper.Verifier) BuilderOpt
- type ConfigOpt
- type DiskInfo
- type Env
- type EnvironmentInfo
- type IInspector
- type InitOpt
- type MemoryInfo
- type Node
- func (node *Node) Blockservice() *dagservice.DagServiceSubmodule
- func (node *Node) Blockstore() *blockstore.BlockstoreSubmodule
- func (node *Node) Chain() *chain2.ChainSubmodule
- func (node *Node) ChainClock() clock.ChainEpochClock
- func (node *Node) ConfigModule() *configModule.ConfigModule
- func (node *Node) Mpool() *mpool.MessagePoolSubmodule
- func (node *Node) MultiSig() *multisig.MultiSigSubmodule
- func (node *Node) Network() *network2.NetworkSubmodule
- func (node *Node) OfflineMode() bool
- func (node *Node) Repo() repo.Repo
- func (node *Node) RunRPCAndWait(ctx context.Context, rootCmdDaemon *cmds.Command, ready chan interface{}) error
- func (node *Node) Start(ctx context.Context) error
- func (node *Node) Stop(ctx context.Context)
- func (node *Node) StorageNetworking() *storagenetworking.StorageNetworkingSubmodule
- func (node *Node) Wallet() *wallet.WalletSubmodule
- type RPCBuilder
- func (builder *RPCBuilder) AddService(service RPCService) error
- func (builder *RPCBuilder) AddServices(services ...RPCService) error
- func (builder *RPCBuilder) Build(version string, limiter *ratelimit.RateLimiter) *jsonrpc.RPCServer
- func (builder *RPCBuilder) NameSpace(nameSpaece string) *RPCBuilder
- type RPCService
- type RuntimeInfo
- type ValueFromCtx
Constants ¶
const APIPrefix = "/api"
APIPrefix is the prefix for the http version of the api.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
Init initializes a Filecoin repo with genesis state and keys. This will always set the configuration for wallet default address (to the specified default key or a newly generated one), but otherwise leave the repo's config object intact. Make further configuration changes after initialization.
func SetNetParams ¶
func SetNetParams(params *config.NetworkParamsConfig)
Types ¶
type AllInspectorInfo ¶
type AllInspectorInfo struct { Config *config.Config Runtime *RuntimeInfo Environment *EnvironmentInfo Disk *DiskInfo Memory *MemoryInfo FilecoinVersion string }
AllInspectorInfo contains all information the inspector can gather.
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is a helper to aid in the construction of a filecoin node.
type BuilderOpt ¶
BuilderOpt is an option for building a filecoin node.
func ChainClockConfigOption ¶
func ChainClockConfigOption(clk clock.ChainEpochClock) BuilderOpt
ChainClockConfigOption returns a function that sets the chainClock to use in the node.
func JournalConfigOption ¶
func JournalConfigOption(jrl journal.Journal) BuilderOpt
JournalConfigOption returns a function that sets the journal to use in the node.
func Libp2pOptions ¶
func Libp2pOptions(opts ...libp2p.Option) BuilderOpt
Libp2pOptions returns a builder option that sets up the libp2p node
func MonkeyPatchNetworkParamsOption ¶
func MonkeyPatchNetworkParamsOption(params *config.NetworkParamsConfig) BuilderOpt
MonkeyPatchNetworkParamsOption returns a function that sets global vars in the binary's specs actor dependency to change network parameters that live there
func MonkeyPatchSetProofTypeOption ¶
func MonkeyPatchSetProofTypeOption(proofType abi.RegisteredSealProof) BuilderOpt
MonkeyPatchSetProofTypeOption returns a function that sets package variable SuppurtedProofTypes to be only the given registered proof type
func OfflineMode ¶
func OfflineMode(offlineMode bool) BuilderOpt
offlineMode enables or disables offline mode.
func OptionsFromRepo ¶
func OptionsFromRepo(r repo.Repo) ([]BuilderOpt, error)
OptionsFromRepo takes a repo and returns options that configure a node to use the given repo.
func PropagationDelay ¶
func PropagationDelay(propDelay time.Duration) BuilderOpt
PropagationDelay sets the time the node needs to wait for blocks to arrive before mining.
func SetAuthURL ¶ added in v0.9.4
func SetAuthURL(url string) BuilderOpt
SetAuthURL set venus auth service URL
func SetWalletPassword ¶ added in v0.9.7
func SetWalletPassword(password []byte) BuilderOpt
SetWalletPassword set wallet password
func VerifierConfigOption ¶
func VerifierConfigOption(verifier ffiwrapper.Verifier) BuilderOpt
VerifierConfigOption returns a function that sets the verifier to use in the node consensus
type Env ¶
type Env struct { InspectorAPI IInspector BlockStoreAPI v1api.IBlockStore ChainAPI v1api.IChain NetworkAPI v1api.INetwork StorageNetworkingAPI storagenetworking.IStorageNetworking SyncerAPI v1api.ISyncer WalletAPI v1api.IWallet MingingAPI v1api.IMining MessagePoolAPI v1api.IMessagePool MultiSigAPI v0api.IMultiSig MarketAPI v1api.IMarket PaychAPI v1api.IPaychan // contains filtered or unexported fields }
Env is the environment for command API handlers.
func NewClientEnv ¶
NewClientEnv returns a new environment for command API clients. This environment lacks direct access to any internal APIs.
type EnvironmentInfo ¶
type EnvironmentInfo struct { VENUSAPI string `json:"VENUS_API"` VENUSPath string `json:"VENUS_PATH"` GoPath string `json:"GOPATH"` }
EnvironmentInfo contains information about the environment filecoin is running in.
type IInspector ¶ added in v0.9.7
type IInspector interface { Runtime() *RuntimeInfo Memory() (*MemoryInfo, error) Config() *config.Config Disk() (*DiskInfo, error) FilecoinVersion() string Environment() *EnvironmentInfo }
func NewInspectorAPI ¶
func NewInspectorAPI(r repo.Repo) IInspector
NewInspectorAPI returns a `Inspector` used to inspect the venus node.
type InitOpt ¶
type InitOpt func(*initCfg)
InitOpt is an option for initialization of a node's repo.
func ImportKeyOpt ¶
ImportKeyOpt imports the provided key during initialization.
type MemoryInfo ¶
MemoryInfo contains information about memory usage.
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node represents a full Filecoin node.
func (*Node) Blockservice ¶
func (node *Node) Blockservice() *dagservice.DagServiceSubmodule
func (*Node) Blockstore ¶
func (node *Node) Blockstore() *blockstore.BlockstoreSubmodule
func (*Node) Chain ¶
func (node *Node) Chain() *chain2.ChainSubmodule
func (*Node) ChainClock ¶
func (node *Node) ChainClock() clock.ChainEpochClock
func (*Node) ConfigModule ¶
func (node *Node) ConfigModule() *configModule.ConfigModule
func (*Node) Mpool ¶
func (node *Node) Mpool() *mpool.MessagePoolSubmodule
func (*Node) MultiSig ¶ added in v0.9.4
func (node *Node) MultiSig() *multisig.MultiSigSubmodule
func (*Node) Network ¶
func (node *Node) Network() *network2.NetworkSubmodule
func (*Node) OfflineMode ¶
func (*Node) RunRPCAndWait ¶
func (node *Node) RunRPCAndWait(ctx context.Context, rootCmdDaemon *cmds.Command, ready chan interface{}) error
RunRPCAndWait start rpc server and listen to signal to exit
func (*Node) StorageNetworking ¶
func (node *Node) StorageNetworking() *storagenetworking.StorageNetworkingSubmodule
func (*Node) Wallet ¶
func (node *Node) Wallet() *wallet.WalletSubmodule
type RPCBuilder ¶ added in v0.9.7
type RPCBuilder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶ added in v0.9.7
func NewBuilder() *RPCBuilder
func (*RPCBuilder) AddService ¶ added in v0.9.7
func (builder *RPCBuilder) AddService(service RPCService) error
func (*RPCBuilder) AddServices ¶ added in v0.9.7
func (builder *RPCBuilder) AddServices(services ...RPCService) error
func (*RPCBuilder) Build ¶ added in v0.9.7
func (builder *RPCBuilder) Build(version string, limiter *ratelimit.RateLimiter) *jsonrpc.RPCServer
func (*RPCBuilder) NameSpace ¶ added in v0.9.7
func (builder *RPCBuilder) NameSpace(nameSpaece string) *RPCBuilder
type RPCService ¶ added in v0.9.7
type RPCService interface { }
type RuntimeInfo ¶
type RuntimeInfo struct { OS string Arch string Version string Compiler string NumProc int GoMaxProcs int NumGoRoutines int NumCGoCalls int64 }
RuntimeInfo contains information about the golang runtime.
type ValueFromCtx ¶ added in v1.7.0
type ValueFromCtx struct{}
func (*ValueFromCtx) AccFromCtx ¶ added in v1.7.0
func (vfc *ValueFromCtx) AccFromCtx(ctx context.Context) (string, bool)
func (*ValueFromCtx) HostFromCtx ¶ added in v1.7.0
func (vfc *ValueFromCtx) HostFromCtx(ctx context.Context) (string, bool)