tools

package
v6.5.0-p2p2-beta2+inco... Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 4 more Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDBReader

func NewDBReader(levelBolt string, path string) *databaseOverlay.Overlay

func UnmarshalGeneric

func UnmarshalGeneric(i interfaces.BinaryMarshallable, raw []byte) error

Types

type APIReader

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

func NewAPIReader

func NewAPIReader(loc string) *APIReader

func (*APIReader) FetchABlockByHeight

func (a *APIReader) FetchABlockByHeight(height uint32) (interfaces.IAdminBlock, error)

func (*APIReader) FetchDBlockByHeight

func (a *APIReader) FetchDBlockByHeight(height uint32) (interfaces.IDirectoryBlock, error)

func (*APIReader) FetchDBlockHead

func (a *APIReader) FetchDBlockHead() (interfaces.IDirectoryBlock, error)

func (*APIReader) FetchEBlock

func (a *APIReader) FetchEBlock(hash interfaces.IHash) (interfaces.IEntryBlock, error)

func (*APIReader) FetchECBlockByHeight

func (a *APIReader) FetchECBlockByHeight(height uint32) (interfaces.IEntryCreditBlock, error)

func (*APIReader) FetchECBlockByPrimary

func (a *APIReader) FetchECBlockByPrimary(keymr interfaces.IHash) (interfaces.IEntryCreditBlock, error)

func (*APIReader) FetchEntry

func (a *APIReader) FetchEntry(hash interfaces.IHash) (interfaces.IEBEntry, error)

func (*APIReader) FetchFBlockByHeight

func (a *APIReader) FetchFBlockByHeight(height uint32) (interfaces.IFBlock, error)

func (*APIReader) FetchHeadIndexByChainID

func (a *APIReader) FetchHeadIndexByChainID(chainID interfaces.IHash) (interfaces.IHash, error)

func (*APIReader) SetChainHeads

func (a *APIReader) SetChainHeads(primaryIndexes, chainIDs []interfaces.IHash) error

type Fetcher

type Fetcher interface {
	SetChainHeads(primaryIndexes, chainIDs []interfaces.IHash) error
	FetchDBlockHead() (interfaces.IDirectoryBlock, error)
	//FetchDBlock(hash interfaces.IHash) (interfaces.IDirectoryBlock, error)
	FetchHeadIndexByChainID(chainID interfaces.IHash) (interfaces.IHash, error)
	FetchEBlock(hash interfaces.IHash) (interfaces.IEntryBlock, error)

	FetchEntry(hash interfaces.IHash) (interfaces.IEBEntry, error)
	FetchDBlockByHeight(dBlockHeight uint32) (interfaces.IDirectoryBlock, error)
	FetchABlockByHeight(blockHeight uint32) (interfaces.IAdminBlock, error)
	FetchFBlockByHeight(blockHeight uint32) (interfaces.IFBlock, error)
	FetchECBlockByHeight(blockHeight uint32) (interfaces.IEntryCreditBlock, error)
	FetchECBlockByPrimary(keymr interfaces.IHash) (interfaces.IEntryCreditBlock, error)
}

Jump to

Keyboard shortcuts

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