inmem

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

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

Entry is a store.Entry implementation

func (*Entry) GetLog

func (e *Entry) GetLog(indx uint64, log *web3.Log) error

GetLog implements the store interface

func (*Entry) LastIndex

func (e *Entry) LastIndex() (uint64, error)

LastIndex implements the store interface

func (*Entry) Logs

func (e *Entry) Logs() []*web3.Log

Logs returns the logs of the inmemory store

func (*Entry) RemoveLogs

func (e *Entry) RemoveLogs(indx uint64) error

RemoveLogs implements the store interface

func (*Entry) StoreLogs

func (e *Entry) StoreLogs(logs []*web3.Log) error

StoreLogs implements the store interface

type InmemStore

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

InmemStore implements the Store interface.

func NewInmemStore

func NewInmemStore() *InmemStore

NewInmemStore returns a new in-memory store.

func (*InmemStore) Close

func (i *InmemStore) Close() error

Close implements the store interface

func (*InmemStore) Get

func (i *InmemStore) Get(k string) (string, error)

Get implements the store interface

func (*InmemStore) GetEntry

func (i *InmemStore) GetEntry(hash string) (store.Entry, error)

GetEntry implements the store interface

func (*InmemStore) ListPrefix

func (i *InmemStore) ListPrefix(prefix string) ([]string, error)

ListPrefix implements the store interface

func (*InmemStore) Set

func (i *InmemStore) Set(k, v string) error

Set implements the store interface

Jump to

Keyboard shortcuts

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