Documentation
¶
Index ¶
- func ConnectionManager(r repo.Repo) (libp2p.Option, error)
- func Identity(r repo.Repo) (libp2p.Option, error)
- func Listener(r repo.Repo) (libp2p.Option, error)
- func RepoAccessOptsOut(repoAccess func(repo.Repo) (libp2p.Option, error)) fx.Option
- type AddParams
- type Droplet
- func (p *Droplet) AddFile(ctx context.Context, r io.Reader, params *AddParams) (ipld.Node, error)
- func (p *Droplet) Adder(ctx context.Context) func(io.Reader) (ipld.Node, error)
- func (p *Droplet) BlockStore() blockstore.Blockstore
- func (p *Droplet) Close()
- func (p *Droplet) Connect(ctx context.Context, pi peer.AddrInfo) error
- func (p *Droplet) Disconnect(ctx context.Context, addr ma.Multiaddr) error
- func (p *Droplet) GetFile(ctx context.Context, c cid.Cid) (ufsio.ReadSeekCloser, error)
- func (p *Droplet) Getter() ipld.DAGService
- func (p *Droplet) HasBlock(c cid.Cid) (bool, error)
- func (p *Droplet) Peers(ctx context.Context) ([]string, error)
- func (p *Droplet) Session(ctx context.Context) ipld.NodeGetter
- type FxLog
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Droplet ¶
type Droplet struct {
Ctx context.Context
Host host.Host
Store datastore.Batching
Bstore blockstore.Blockstore
DHT routing.Routing
Bserv blockservice.BlockService
DAGService ipld.DAGService
Repo repo.Repo
Provider provider.System
Reporter *metrics.BandwidthCounter
Sender messenger.Sender
Listener *messenger.Listener
// contains filtered or unexported fields
}
Droplet is an NotSoLite ipfs node
func (*Droplet) BlockStore ¶
func (p *Droplet) BlockStore() blockstore.Blockstore
BlockStore offers access to the blockstore underlying the Droplet's DAGService.
func (*Droplet) Disconnect ¶
Disconnect host from a given peer
func (*Droplet) GetFile ¶
GetFile returns a reader to a file as identified by its root CID. The file must have been added as a UnixFS DAG (default for IPFS).
func (*Droplet) Getter ¶
func (p *Droplet) Getter() ipld.DAGService
func (*Droplet) HasBlock ¶
HasBlock returns whether a given block is available locally. It is a shorthand for .Blockstore().Has().
Click to show internal directories.
Click to hide internal directories.