mhprimary

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: Apache-2.0, MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const SizePrefix = 4

Variables

This section is empty.

Functions

This section is empty.

Types

type MultihashPrimary

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

A primary storage that is multihash aware.

func OpenMultihashPrimary

func OpenMultihashPrimary(path string) (*MultihashPrimary, error)

func (*MultihashPrimary) Close

func (cp *MultihashPrimary) Close() error

func (*MultihashPrimary) Flush

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

func (*MultihashPrimary) Get

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

func (*MultihashPrimary) GetIndexKey

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

func (*MultihashPrimary) IndexKey

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

func (*MultihashPrimary) Iter

func (*MultihashPrimary) OutstandingWork

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

func (*MultihashPrimary) Put

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

func (*MultihashPrimary) Sync

func (cp *MultihashPrimary) Sync() error

type MultihashPrimaryIter

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

func NewMultihashPrimaryIter

func NewMultihashPrimaryIter(reader *os.File) *MultihashPrimaryIter

func (*MultihashPrimaryIter) Next

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

Jump to

Keyboard shortcuts

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