Documentation ¶
Index ¶
- Constants
- Variables
- type ID
- type Index
- func (tt *Index) FindInBlocks(ctx context.Context, from, to idx.Block, pattern [][]common.Hash) (logs []*types.Log, err error)
- func (tt *Index) ForEach(ctx context.Context, pattern [][]common.Hash, ...) error
- func (tt *Index) ForEachInBlocks(ctx context.Context, from, to idx.Block, pattern [][]common.Hash, ...) error
- func (tt *Index) MustPush(recs ...*types.Log)
- func (tt *Index) Push(recs ...*types.Log) error
Constants ¶
View Source
const MaxTopicsCount = math.MaxUint8
Variables ¶
View Source
var (
ErrEmptyTopics = fmt.Errorf("Empty topics")
)
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index is a specialized indexes for log records storing and fetching.
func (*Index) FindInBlocks ¶
func (tt *Index) FindInBlocks(ctx context.Context, from, to idx.Block, pattern [][]common.Hash) (logs []*types.Log, err error)
FindInBlocks returns all log records of block range by pattern. 1st pattern element is an address. The same as FindInBlocksAsync but fetches log's body sync.
func (*Index) ForEach ¶
func (tt *Index) ForEach(ctx context.Context, pattern [][]common.Hash, onLog func(*types.Log) (gonext bool)) error
ForEach matches log records by pattern. 1st pattern element is an address.
func (*Index) ForEachInBlocks ¶
func (tt *Index) ForEachInBlocks(ctx context.Context, from, to idx.Block, pattern [][]common.Hash, onLog func(*types.Log) (gonext bool)) error
ForEachInBlocks matches log records of block range by pattern. 1st pattern element is an address.
Click to show internal directories.
Click to hide internal directories.