cidprimary

package
v0.0.0-...-37434a1 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const CIDSizePrefix = 4

Variables

This section is empty.

Functions

This section is empty.

Types

type CIDPrimary

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

A primary storage that is CID aware.

func OpenCIDPrimary

func OpenCIDPrimary(path string) (*CIDPrimary, error)

func (*CIDPrimary) Close

func (cp *CIDPrimary) Close() error

func (*CIDPrimary) Flush

func (cp *CIDPrimary) Flush() (types.Work, error)

func (*CIDPrimary) Get

func (cp *CIDPrimary) Get(blk types.Block) (key []byte, value []byte, err error)

func (*CIDPrimary) GetIndexKey

func (cp *CIDPrimary) GetIndexKey(blk types.Block) ([]byte, error)

func (*CIDPrimary) IndexKey

func (cp *CIDPrimary) IndexKey(key []byte) ([]byte, error)

func (*CIDPrimary) Iter

func (*CIDPrimary) OutstandingWork

func (cp *CIDPrimary) OutstandingWork() types.Work

func (*CIDPrimary) Put

func (cp *CIDPrimary) Put(key []byte, value []byte) (types.Block, error)

func (*CIDPrimary) Sync

func (cp *CIDPrimary) Sync() error

type CIDPrimaryIter

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

func NewCIDPrimaryIter

func NewCIDPrimaryIter(reader *os.File) *CIDPrimaryIter

func (*CIDPrimaryIter) Next

func (cpi *CIDPrimaryIter) Next() ([]byte, []byte, error)

Jump to

Keyboard shortcuts

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