client

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: MIT Imports: 23 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BalanceNode

func BalanceNode(f io.Reader, bufDs ipld.DAGService, cidBuilder cid.Builder) (node ipld.Node, err error)

BalanceNode split the file and store it in DAGService as node

func BuildDataCidByLinks(ctx context.Context, dagServ ipld.DAGService, cidBuilder cid.Builder, links []LinkInfo) (cid.Cid, error)

func NewBlockService added in v0.2.0

func NewBlockService(blkstore blockstore.Blockstore) blockservice.BlockService

func NewPoolClient

func NewPoolClient(addr, user, password string, enablePin bool) (*dagPoolClient, error)

NewPoolClient new a dagPoolClient

func NewUnixfsNodeFromDag added in v0.2.0

func NewUnixfsNodeFromDag(nd *dag.ProtoNode) (*unixfsNode, error)

func RemoveDAG added in v0.2.0

func RemoveDAG(ctx context.Context, dagServ ipld.DAGService, root cid.Cid) error

Types

type LinkInfo added in v0.2.0

type LinkInfo struct {
	Link     *ipld.Link
	FileSize uint64
}

func CreateLinkInfo added in v0.2.0

func CreateLinkInfo(ctx context.Context, dagServ ipld.DAGService, c cid.Cid) (LinkInfo, error)

type PoolClient

type PoolClient interface {
	blockstore.Blockstore

	Close(ctx context.Context)
}

PoolClient is a DAGService interface

func NewMockPoolClient added in v0.2.0

func NewMockPoolClient(t *testing.T) (PoolClient, func())

NewMockPoolClient creates a mock of PoolClient

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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