Documentation ¶
Index ¶
- Variables
- func BaseBlockstoreCtor(cacheOpts blockstore.CacheOpts, nilRepo bool, hashOnRead bool) ...
- func BlockService(lc fx.Lifecycle, bs blockstore.Blockstore, rem exchange.Interface) blockservice.BlockService
- func Dag(bs blockservice.BlockService) format.DAGService
- func Datastore(repo repo.Repo) datastore.Datastore
- func GcBlockstoreCtor(bb BaseBlocks) (gclocker blockstore.GCLocker, gcbs blockstore.GCBlockstore, ...)
- func IPFS(ctx context.Context, bcfg *BuildCfg) fx.Option
- func Identity(cfg *config.Config) fx.Option
- func LibP2P(bcfg *BuildCfg, cfg *config.Config) fx.Option
- func Networked(bcfg *BuildCfg, cfg *config.Config) fx.Option
- func Offline(cfg *config.Config) fx.Option
- func Online(bcfg *BuildCfg, cfg *config.Config) fx.Option
- func OnlineExchange(provide bool) interface{}
- func PeerID(id peer.ID) func() peer.ID
- func PrivateKey(sk crypto.PrivKey) func(id peer.ID) (crypto.PrivKey, error)
- func RecordValidator(ps peerstore.Peerstore) record.Validator
- func RepoConfig(repo repo.Repo) (*config.Config, error)
- func Storage(bcfg *BuildCfg, cfg *config.Config) fx.Option
- type BaseBlocks
- type BuildCfg
Constants ¶
This section is empty.
Variables ¶
View Source
var BaseLibP2P = fx.Options( fx.Provide(libp2p.ConnectionManager), fx.Provide(libp2p.DefaultTransports), fx.Provide(libp2p.Host), fx.Provide(libp2p.DiscoveryHandler), )
View Source
var Core = fx.Options( fx.Provide(BlockService), fx.Provide(Dag), fx.Provide(resolver.NewBasicResolver), )
Core groups basic IPFS services
View Source
var IPNS = fx.Options( fx.Provide(RecordValidator), )
IPNS groups namesys related units
Functions ¶
func BaseBlockstoreCtor ¶
func BaseBlockstoreCtor(cacheOpts blockstore.CacheOpts, nilRepo bool, hashOnRead bool) func(mctx helpers.MetricsCtx, repo repo.Repo, lc fx.Lifecycle) (bs BaseBlocks, err error)
BaseBlockstoreCtor creates cached blockstore backed by the provided datastore
func BlockService ¶
func BlockService(lc fx.Lifecycle, bs blockstore.Blockstore, rem exchange.Interface) blockservice.BlockService
BlockService creates new blockservice which provides an interface to fetch content-addressable blocks
func GcBlockstoreCtor ¶
func GcBlockstoreCtor(bb BaseBlocks) (gclocker blockstore.GCLocker, gcbs blockstore.GCBlockstore, bs blockstore.Blockstore)
GcBlockstoreCtor wraps the base blockstore with GC and Filestore layers
func OnlineExchange ¶
func OnlineExchange(provide bool) interface{}
OnlineExchange creates new LibP2P backed block exchange (BitSwap)
func PrivateKey ¶
PrivateKey loads the private key from config
func RecordValidator ¶
RecordValidator provides namesys compatible routing record validator
func RepoConfig ¶
RepoConfig loads configuration from the repo
Types ¶
type BaseBlocks ¶
type BaseBlocks blockstore.Blockstore
BaseBlocks is the lower level blockstore without GC or Filestore layers
type BuildCfg ¶
type BuildCfg struct { // If online is set, the node will have networking enabled Online bool // ExtraOpts is a map of extra options used to configure the ipfs nodes creation ExtraOpts map[string]bool // If permanent then node should run more expensive processes // that will improve performance in long run Permanent bool Routing libp2p.RoutingOption Host libp2p.HostOption Repo repo.Repo }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.