trackerpostgresql

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: MPL-2.0 Imports: 8 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(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) 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 PostgreSQLStore

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

PostgreSQLStore is a tracker store implementation that uses PostgreSQL as a backend.

func NewPostgreSQLStore

func NewPostgreSQLStore(endpoint string) (*PostgreSQLStore, error)

NewPostgreSQLStore creates a new PostgreSQL store

func NewSQLStore

func NewSQLStore(db *sql.DB, driver string) (*PostgreSQLStore, error)

NewSQLStore creates a new store with an sql driver

func (*PostgreSQLStore) Close

func (p *PostgreSQLStore) Close() error

Close implements the store interface

func (*PostgreSQLStore) Get

func (p *PostgreSQLStore) Get(k string) (string, error)

Get implements the store interface

func (*PostgreSQLStore) GetEntry

func (p *PostgreSQLStore) GetEntry(hash string) (store.Entry, error)

GetEntry implements the store interface

func (*PostgreSQLStore) ListPrefix

func (p *PostgreSQLStore) ListPrefix(prefix string) ([]string, error)

ListPrefix implements the store interface

func (*PostgreSQLStore) Set

func (p *PostgreSQLStore) 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