postgresql

package
v0.0.0-...-8f649d9 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: LGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

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

Backend is the postgresql backend

func Factory

func Factory(config map[string]interface{}, logger hclog.Logger) (*Backend, error)

Factory creates a PostgreSQL storage

func (*Backend) Close

func (b *Backend) Close() error

Close implements the storage interface

func (*Backend) ReadBody

func (b *Backend) ReadBody(hash types.Hash) (*types.Body, bool)

ReadBody implements the storage backend

func (*Backend) ReadCanonicalHash

func (b *Backend) ReadCanonicalHash(n uint64) (types.Hash, bool)

ReadCanonicalHash implements the storage backend

func (*Backend) ReadDiff

func (b *Backend) ReadDiff(hash types.Hash) (*big.Int, bool)

ReadDiff implements the storage backend

func (*Backend) ReadForks

func (b *Backend) ReadForks() []types.Hash

ReadForks implements the storage backend

func (*Backend) ReadHeadHash

func (b *Backend) ReadHeadHash() (types.Hash, bool)

ReadHeadHash implements the storage backend

func (*Backend) ReadHeadNumber

func (b *Backend) ReadHeadNumber() (uint64, bool)

ReadHeadNumber implements the storage backend

func (*Backend) ReadHeader

func (b *Backend) ReadHeader(hash types.Hash) (*types.Header, bool)

ReadHeader implements the storage backend

func (*Backend) ReadReceipts

func (b *Backend) ReadReceipts(hash types.Hash) ([]*types.Receipt, bool)

ReadReceipts implements the storage interface

func (*Backend) ReadSnapshot

func (b *Backend) ReadSnapshot(hash types.Hash) ([]byte, bool)

ReadSnapshot implements the storage backend

func (*Backend) ReadTransaction

func (b *Backend) ReadTransaction(hash types.Hash) (*types.Transaction, bool)

ReadTransaction read a transaction by hash

func (*Backend) ReadTxLookup

func (b *Backend) ReadTxLookup(hash types.Hash) (types.Hash, bool)

ReadTxLookup implements the storage backend

func (*Backend) WriteBody

func (b *Backend) WriteBody(hash types.Hash, body *types.Body) error

WriteBody implements the storage backend

func (*Backend) WriteCanonicalHash

func (b *Backend) WriteCanonicalHash(n uint64, hash types.Hash) error

WriteCanonicalHash implements the storage backend

func (*Backend) WriteCanonicalHeader

func (b *Backend) WriteCanonicalHeader(h *types.Header, diff *big.Int) error

WriteCanonicalHeader implements the storage backend

func (*Backend) WriteDiff

func (b *Backend) WriteDiff(hash types.Hash, diff *big.Int) error

WriteDiff implements the storage backend

func (*Backend) WriteForks

func (b *Backend) WriteForks(forks []types.Hash) error

WriteForks implements the storage backend

func (*Backend) WriteHeadHash

func (b *Backend) WriteHeadHash(h types.Hash) error

WriteHeadHash implements the storage backend

func (*Backend) WriteHeadNumber

func (b *Backend) WriteHeadNumber(n uint64) error

WriteHeadNumber implements the storage backend

func (*Backend) WriteHeader

func (b *Backend) WriteHeader(h *types.Header) error

WriteHeader implements the storage backend

func (*Backend) WriteReceipts

func (b *Backend) WriteReceipts(hash types.Hash, receipts []*types.Receipt) error

WriteReceipts implements the storage interface

func (*Backend) WriteSnapshot

func (b *Backend) WriteSnapshot(hash types.Hash, blob []byte) error

WriteSnapshot implements the storage backend

func (*Backend) WriteTransaction

func (b *Backend) WriteTransaction(hash types.Hash, t *types.Transaction) error

func (*Backend) WriteTxLookup

func (b *Backend) WriteTxLookup(hash types.Hash, blockHash types.Hash) error

WriteTxLookup implements the storage backend

Jump to

Keyboard shortcuts

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