tracker

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: Apache-2.0 Imports: 14 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 an store.Entry implementation

func (*Entry) GetLog

func (e *Entry) GetLog(idx uint64, log *ethgo.Log) error

GetLog implements the store.Entry interface

func (*Entry) LastIndex

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

LastIndex implements the store.Entry interface

func (*Entry) RemoveLogs

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

RemoveLogs implements the store.Entry interface

func (*Entry) StoreLog

func (e *Entry) StoreLog(log *ethgo.Log) error

StoreLog implements the store.Entry interface

func (*Entry) StoreLogs

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

StoreLogs implements the store.Entry interface logs are added in sequentional order

type EventTracker

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

func NewEventTracker

func NewEventTracker(
	dbPath string,
	rpcEndpoint string,
	contractAddr ethgo.Address,
	subscriber eventSubscription,
	numBlockConfirmations uint64,
	startBlock uint64,
	logger hcf.Logger,
) *EventTracker

func (*EventTracker) Start

func (e *EventTracker) Start(ctx context.Context) error

type EventTrackerStore

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

EventTrackerStore is a tracker store implementation.

func NewEventTrackerStore

func NewEventTrackerStore(
	path string,
	numBlockConfirmations uint64,
	subscriber eventSubscription,
	logger hcf.Logger) (*EventTrackerStore, error)

NewEventTrackerStore creates a new EventTrackerStore

func (*EventTrackerStore) Close

func (b *EventTrackerStore) Close() error

Close implements the store interface

func (*EventTrackerStore) Get

func (b *EventTrackerStore) Get(k string) (string, error)

Get implements the store interface

func (*EventTrackerStore) GetEntry

func (b *EventTrackerStore) GetEntry(hash string) (store.Entry, error)

GetEntry implements the store interface

func (*EventTrackerStore) ListPrefix

func (b *EventTrackerStore) ListPrefix(prefix string) ([]string, error)

ListPrefix implements the store interface

func (*EventTrackerStore) Set

func (b *EventTrackerStore) 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