Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorEmptyHash = errors.New("transaction hash cannot be empty")
ErrorEmptyHash indicates empty hash
Functions ¶
This section is empty.
Types ¶
type Batch ¶
type Batch struct {
Ops []*avsi.DVSRequestResult
}
Batch groups together multiple Index operations to be performed at the same time. NOTE: Batch is NOT thread-safe and must not be modified after starting its execution.
type DvsRequestIndexer ¶
type DvsRequestIndexer interface {
// AddBatch analyzes, indexes and stores a batch of transactions.
AddBatch(b *Batch) error
// Index analyzes, indexes and stores a single transaction.
Index(result *avsi.DVSRequestResult) error
// Get returns the transaction specified by hash or nil if the transaction is not indexed
// or stored.
Get(hash []byte) (*avsi.DVSRequestResult, error)
//Set Logger
SetLogger(l log.Logger)
// Search allows you to query for transactions.
Search(ctx context.Context, q *query.Query) ([]*avsi.DVSRequestResult, error)
}
TxIndexer interface defines methods to index and search transactions.
Click to show internal directories.
Click to hide internal directories.