node

package
v0.1.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2022 License: Apache-2.0, MIT Imports: 46 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BootstrapPeers []peer.AddrInfo

Functions

This section is empty.

Types

type EstuaryBlockstore

type EstuaryBlockstore interface {
	blockstore.Blockstore
	DeleteMany(context.Context, []cid.Cid) error
}

type Node

type Node struct {
	Dht      *dht.IpfsDHT
	Provider *batched.BatchProvidingSystem
	FullRT   *fullrt.FullRT
	FilDht   *dht.IpfsDHT
	Host     host.Host

	StorageDir string
	//Lmdb      *lmdb.Blockstore
	Datastore datastore.Batching

	Blockstore      blockstore.Blockstore
	Bitswap         *bitswap.Bitswap
	NotifBlockstore *NotifyBlockstore

	Wallet *wallet.LocalWallet

	Bwc      *metrics.BandwidthCounter
	Peering  *peering.EstuaryPeeringService
	Config   *config.Node
	ArEngine *autoretrieve.AutoretrieveEngine
}

func Setup

func Setup(ctx context.Context, init NodeInitializer) (*Node, error)

type NodeInitializer

type NodeInitializer interface {
	BlockstoreWrap(blockstore.Blockstore) (blockstore.Blockstore, error)
	KeyProviderFunc(context.Context) (<-chan cid.Cid, error)
	Config() *config.Node
}

type NotifyBlockstore

type NotifyBlockstore struct {
	EstuaryBlockstore
	// contains filtered or unexported fields
}

func NewNotifBs

func NewNotifBs(bstore EstuaryBlockstore) *NotifyBlockstore

func (*NotifyBlockstore) Put

func (nb *NotifyBlockstore) Put(ctx context.Context, blk blocks.Block) error

func (*NotifyBlockstore) PutMany

func (nb *NotifyBlockstore) PutMany(ctx context.Context, blks []blocks.Block) error

func (*NotifyBlockstore) WaitFor

func (nb *NotifyBlockstore) WaitFor(ctx context.Context, c cid.Cid) <-chan blocks.Block

Directories

Path Synopsis
modules

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL