node

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2022 License: Apache-2.0, MIT Imports: 45 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      SanityCheckBlockstore
	Bitswap         *bitswap.Bitswap
	NotifBlockstore *NotifyBlockstore

	Wallet *wallet.LocalWallet

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

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

type SanityCheckBlockstore added in v0.2.0

type SanityCheckBlockstore struct {
	blockstore.Blockstore
	// contains filtered or unexported fields
}

func (SanityCheckBlockstore) Get added in v0.2.0

func (sc SanityCheckBlockstore) Get(ctx context.Context, cid cid.Cid) (blocks.Block, error)

func (SanityCheckBlockstore) SetSanityCheckFn added in v0.2.0

func (sc SanityCheckBlockstore) SetSanityCheckFn(fn sanityCheckFn)

Directories

Path Synopsis
modules

Jump to

Keyboard shortcuts

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