ipld

package
v2.3.6 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: Apache-2.0, MIT Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalCBOR added in v2.3.1

func MarshalCBOR(o cbor.Marshaler) (cid.Cid, []byte, error)

Marshals an object to bytes for storing in state.

func NewADTStore

func NewADTStore(ctx context.Context) adt.Store

Creates a new, empty IPLD store in memory.

func NewSyncADTStore added in v2.0.3

func NewSyncADTStore(ctx context.Context) adt.Store

Creates a new, threadsafe, empty IPLD store in memory

Types

type BlockStoreInMemory

type BlockStoreInMemory struct {
	// contains filtered or unexported fields
}

func NewBlockStoreInMemory

func NewBlockStoreInMemory() *BlockStoreInMemory

func (*BlockStoreInMemory) Get

func (mb *BlockStoreInMemory) Get(ctx context.Context, c cid.Cid) (block.Block, error)

func (*BlockStoreInMemory) Put

type MetricsBlockStore added in v2.3.5

type MetricsBlockStore struct {
	Writes     uint64
	WriteBytes uint64
	Reads      uint64
	ReadBytes  uint64
	// contains filtered or unexported fields
}

func NewMetricsBlockStore added in v2.3.5

func NewMetricsBlockStore(underlying cbor.IpldBlockstore) *MetricsBlockStore

func (*MetricsBlockStore) Get added in v2.3.5

func (ms *MetricsBlockStore) Get(ctx context.Context, c cid.Cid) (block.Block, error)

func (*MetricsBlockStore) Put added in v2.3.5

func (*MetricsBlockStore) ReadCount added in v2.3.5

func (ms *MetricsBlockStore) ReadCount() uint64

func (*MetricsBlockStore) ReadSize added in v2.3.5

func (ms *MetricsBlockStore) ReadSize() uint64

func (*MetricsBlockStore) WriteCount added in v2.3.5

func (ms *MetricsBlockStore) WriteCount() uint64

func (*MetricsBlockStore) WriteSize added in v2.3.5

func (ms *MetricsBlockStore) WriteSize() uint64

type SyncBlockStoreInMemory added in v2.0.3

type SyncBlockStoreInMemory struct {
	// contains filtered or unexported fields
}

func NewSyncBlockStoreInMemory added in v2.0.3

func NewSyncBlockStoreInMemory() *SyncBlockStoreInMemory

func (*SyncBlockStoreInMemory) Get added in v2.0.3

func (ss *SyncBlockStoreInMemory) Get(ctx context.Context, c cid.Cid) (block.Block, error)

func (*SyncBlockStoreInMemory) Put added in v2.0.3

Jump to

Keyboard shortcuts

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