kv

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseEventSeqFromEventKey

func ParseEventSeqFromEventKey(key []byte) (int64, error)

Types

type DvsRequestIndex

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

DvsRequestIndex is the simplest possible requestindex, backed by key-value storage (levelDB).

func NewDvsRequestIndex

func NewDvsRequestIndex(store dbm.DB) *DvsRequestIndex

NewDvsRequestIndex creates new KV requestindex.

func (*DvsRequestIndex) AddBatch

func (dvsReqIdx *DvsRequestIndex) AddBatch(batch *requestindex.Batch) error

func (*DvsRequestIndex) Get

func (dvsReqIdx *DvsRequestIndex) Get(hash []byte) (*avsi.DVSRequestResult, error)

Get gets transaction from the DvsRequestIndex storage and returns it or nil if the transaction is not found.

func (*DvsRequestIndex) GetEventSeq

func (dvsReqIdx *DvsRequestIndex) GetEventSeq() (*big.Int, error)

func (*DvsRequestIndex) Index

func (dvsReqIdx *DvsRequestIndex) Index(result *avsi.DVSRequestResult) error

func (*DvsRequestIndex) Search

func (dvsReqIdx *DvsRequestIndex) Search(ctx context.Context, q *query.Query) ([]*avsi.DVSRequestResult, error)

Search performs a search using the given query. Search will exit early and return any result fetched so far, when a message is received on the context chan.

func (*DvsRequestIndex) SetLogger

func (dvsReqIdx *DvsRequestIndex) SetLogger(l log.Logger)

Jump to

Keyboard shortcuts

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