com

package
v0.0.0-...-f6ce140 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PubsubRouter

func PubsubRouter(
	mctx helpers.MetricsCtx,
	lc fx.Lifecycle,
	in p2pPSRoutingIn,
) (p2pRouterOut, *namesys.PubsubValueStore, error)

func RcPinning

func RcPinning(
	bstore blockstore.Blockstore,
	dserv ipld.DAGService,
	repo repo.Repo,
) pin.Pinner

RcPinning creates new pinner which tells GC which blocks should be kept.

func RegisterPinnerMetrics

func RegisterPinnerMetrics()

Types

type WrappedPinner

type WrappedPinner struct {
	Pinner *rcpinner.RcPinner
}

func GetRcPinner

func GetRcPinner(v pin.Pinner) *WrappedPinner

func (*WrappedPinner) CheckIfPinned

func (p *WrappedPinner) CheckIfPinned(
	ctx context.Context,
	cids ...cid.Cid,
) ([]pin.Pinned, error)

func (*WrappedPinner) DirectKeys

func (p *WrappedPinner) DirectKeys(
	ctx context.Context,
) <-chan pin.StreamedCid

func (*WrappedPinner) DirectKeysWithCount

func (p *WrappedPinner) DirectKeysWithCount(
	ctx context.Context,
) <-chan *rcpinner.StreamedCidWithCount

func (*WrappedPinner) Flush

func (p *WrappedPinner) Flush(ctx context.Context) error

func (*WrappedPinner) GetCount

func (p *WrappedPinner) GetCount(
	ctx context.Context,
	c cid.Cid,
	recursive bool,
) (uint16, error)

func (*WrappedPinner) InternalPins

func (p *WrappedPinner) InternalPins(
	ctx context.Context,
) <-chan pin.StreamedCid

func (*WrappedPinner) IsPinned

func (p *WrappedPinner) IsPinned(
	ctx context.Context,
	c cid.Cid,
) (string, bool, error)

func (*WrappedPinner) IsPinnedWithType

func (p *WrappedPinner) IsPinnedWithType(
	ctx context.Context,
	c cid.Cid,
	mode pin.Mode,
) (string, bool, error)

func (*WrappedPinner) Pin

func (p *WrappedPinner) Pin(
	ctx context.Context,
	node ipld.Node,
	recursive bool,
) error

func (*WrappedPinner) PinWithMode

func (p *WrappedPinner) PinWithMode(
	ctx context.Context,
	cid cid.Cid,
	mode pin.Mode,
) error

func (*WrappedPinner) RecursiveKeys

func (p *WrappedPinner) RecursiveKeys(
	ctx context.Context,
) <-chan pin.StreamedCid

func (*WrappedPinner) RecursiveKeysWithCount

func (p *WrappedPinner) RecursiveKeysWithCount(
	ctx context.Context,
) <-chan *rcpinner.StreamedCidWithCount

func (*WrappedPinner) TotalPinnedCount

func (p *WrappedPinner) TotalPinnedCount() int64

func (*WrappedPinner) Unpin

func (p *WrappedPinner) Unpin(
	ctx context.Context,
	cid cid.Cid,
	recursive bool,
) error

func (*WrappedPinner) Update

func (p *WrappedPinner) Update(
	ctx context.Context,
	from cid.Cid,
	to cid.Cid,
	unpin bool,
) error

func (*WrappedPinner) UpdateCounts

func (p *WrappedPinner) UpdateCounts(
	ctx context.Context,
	incs []*rcpinner.UpdateCount,
	decs []*rcpinner.UpdateCount,
) error

Jump to

Keyboard shortcuts

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