Documentation
¶
Index ¶
- func ConfigureLogger(filter string, logger *zap.Logger, logLevel string) error
- func CreateBuildConfigWithDatastore(opts *BuildOpts, ds ipfs_datastore.Batching) (*ipfs_node.BuildCfg, error)
- func CreateRepo(dstore ipfs_datastore.Batching, opts *BuildOpts) (ipfs_repo.Repo, error)
- func NewConfigurableCoreAPI(ctx context.Context, cfg *ipfs_node.BuildCfg, options ...NewAPIOption) (ipfs_interface.CoreAPI, *ipfs_core.IpfsNode, error)
- func NewDatastoreKeystore(ds datastore.Datastore) keystore.Keystore
- func NewInMemoryCoreAPI(ctx context.Context, listeners ...string) (ipfs_interface.CoreAPI, *ipfs_core.IpfsNode, error)
- func NewNamespacedDatastore(child ds.Datastore, prefix ds.Key) ds.Batching
- func OptionMDNSDiscovery(ctx context.Context, node *ipfs_core.IpfsNode, api ipfs_interface.CoreAPI) error
- func TestingRepo(t testing.TB) ipfs_repo.Repo
- type BuildOpts
- type CoreAPIMock
- type DiscoveryNotifee
- type NewAPIOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureLogger ¶
func CreateRepo ¶
func NewConfigurableCoreAPI ¶
func NewConfigurableCoreAPI(ctx context.Context, cfg *ipfs_node.BuildCfg, options ...NewAPIOption) (ipfs_interface.CoreAPI, *ipfs_core.IpfsNode, error)
NewConfigurableCoreAPI returns an IPFS CoreAPI from a provided ipfs_node.BuildCfg
func NewInMemoryCoreAPI ¶
func NewInMemoryCoreAPI(ctx context.Context, listeners ...string) (ipfs_interface.CoreAPI, *ipfs_core.IpfsNode, error)
NewInMemoryCoreAPI returns an IPFS CoreAPI based on an opininated ipfs_node.BuildCfg
func NewNamespacedDatastore ¶
func OptionMDNSDiscovery ¶
Types ¶
type CoreAPIMock ¶
type CoreAPIMock interface { ipfs_interface.CoreAPI MockNetwork() libp2p_mocknet.Mocknet MockNode() *ipfs_core.IpfsNode Close() }
CoreAPIMock implements ipfs.CoreAPI and adds some debugging helpers
func TestingCoreAPI ¶
func TestingCoreAPI(ctx context.Context, t testing.TB) CoreAPIMock
TestingCoreAPI returns a fully initialized mocked Core API. If you want to do some tests involving multiple peers you should use `TestingCoreAPIUsingMockNet` with the same mocknet instead.
func TestingCoreAPIUsingMockNet ¶
func TestingCoreAPIUsingMockNet(ctx context.Context, t testing.TB, m libp2p_mocknet.Mocknet) CoreAPIMock
TestingCoreAPIUsingMockNet returns a fully initialized mocked Core API with the given mocknet
type DiscoveryNotifee ¶
type DiscoveryNotifee struct {
// contains filtered or unexported fields
}
func (*DiscoveryNotifee) HandlePeerFound ¶
func (n *DiscoveryNotifee) HandlePeerFound(pi peer.AddrInfo)
type NewAPIOption ¶
Click to show internal directories.
Click to hide internal directories.