bzzdb

package
v0.0.0-...-e766b56 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FeedIndexFetcher

type FeedIndexFetcher interface {
	FeedIndexLatest(
		ctx context.Context,
		owner common.Address,
		topic client.Topic,
	) (client.FeedIndexResponse, error)
}

type FeedIndexer

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

func NewFeedIndexer

func NewFeedIndexer(indexFetcher FeedIndexFetcher, owner common.Address) *FeedIndexer

func (*FeedIndexer) AcquireNext

func (i *FeedIndexer) AcquireNext(ctx context.Context, topic client.Topic) (Index, error)

func (*FeedIndexer) Current

func (i *FeedIndexer) Current(ctx context.Context, topic client.Topic) (Index, bool, error)

func (*FeedIndexer) Release

func (i *FeedIndexer) Release(topic client.Topic, index Index)

type Index

type Index = uint64

type KeyValueStore

type KeyValueStore interface {
	Has(key []byte) (bool, error)
	Get(key []byte) ([]byte, error)
	Put(key []byte, value []byte) error
	Delete(key []byte) error
	io.Closer
}

KeyValueStore is local interface matching ethereum's ethdb.KeyValueStore. Currently this interface only has minimum set of method to cover the most basic operations. Over time this interface should expand to fully match ethdb.KeyValueStore interface.

func New

func New(
	privateKey *ecdsa.PrivateKey,
	beeCli client.Client,
	postage postage.Postage,
) (KeyValueStore, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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