dagservice

package
v1.16.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: Apache-2.0, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DagServiceSubmodule

type DagServiceSubmodule struct {
	// dagservice is a higher level interface for fetching data
	Blockservice bserv.BlockService

	Dag *dag.DAG
}

DagServiceSubmodule enhances the `Node` with networked key/value fetching capabilities. - `BlockService` is shared by chain/graphsync and piece/bitswap data

func NewDagserviceSubmodule

func NewDagserviceSubmodule(ctx context.Context, dagCfg dagConfig, network *network.NetworkSubmodule) (*DagServiceSubmodule, error)

NewDagserviceSubmodule creates a new block service submodule.

func (*DagServiceSubmodule) API

func (blockService *DagServiceSubmodule) API() IDagService

func (*DagServiceSubmodule) V0API

func (blockService *DagServiceSubmodule) V0API() IDagService

type IDagService added in v1.2.0

type IDagService interface {
	DAGGetNode(ctx context.Context, ref string) (interface{}, error)
	DAGGetFileSize(ctx context.Context, c cid.Cid) (uint64, error)
	DAGCat(ctx context.Context, c cid.Cid) (io.Reader, error)
	DAGImportData(ctx context.Context, data io.Reader) (ipld.Node, error)
}

Jump to

Keyboard shortcuts

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