Documentation
¶
Index ¶
- Constants
- Variables
- type BigTableEthRaw
- func (r *BigTableEthRaw) BlockByNumber(ctx context.Context, number *big.Int) ([]byte, error)
- func (r *BigTableEthRaw) BlockReceipts(ctx context.Context, number *big.Int) ([]byte, error)
- func (r *BigTableEthRaw) RoundTrip(request *http.Request) (*http.Response, error)
- func (r *BigTableEthRaw) TraceBlockByNumber(ctx context.Context, number *big.Int) ([]byte, error)
- func (r *BigTableEthRaw) UncleByBlockHashAndIndex(ctx context.Context, hash string, index int64) ([]byte, error)
- func (r *BigTableEthRaw) UncleByBlockNumberAndIndex(ctx context.Context, number *big.Int, index int64) ([]byte, error)
- type Bytes
- type CachedRawStore
- func (c *CachedRawStore) ReadBlockByHash(chainID uint64, hash string) (*FullBlockRawData, error)
- func (c *CachedRawStore) ReadBlockByNumber(chainID uint64, number int64) (*FullBlockRawData, error)
- func (c *CachedRawStore) ReadBlocksByNumber(chainID uint64, start, end int64) ([]*FullBlockRawData, error)
- type FullBlockRawData
- type MinimalBlock
- type RawStore
- func (db RawStore) AddBlocks(blocks []FullBlockRawData) error
- func (db RawStore) ReadBlockByHash(chainID uint64, hash string) (*FullBlockRawData, error)
- func (db RawStore) ReadBlockByNumber(chainID uint64, number int64) (*FullBlockRawData, error)
- func (db RawStore) ReadBlocksByNumber(chainID uint64, start, end int64) ([]*FullBlockRawData, error)
- type RawStoreReader
- type WithFallback
Constants ¶
View Source
const BT_COLUMNFAMILY_BLOCK = "b"
View Source
const BT_COLUMNFAMILY_RECEIPTS = "r"
View Source
const BT_COLUMNFAMILY_TRACES = "t"
View Source
const BT_COLUMNFAMILY_UNCLES = "u"
View Source
const BT_COLUMN_BLOCK = "b"
View Source
const BT_COLUMN_RECEIPTS = "r"
View Source
const BT_COLUMN_TRACES = "t"
View Source
const BT_COLUMN_UNCLES = "u"
View Source
const BlocksRawTable = "blocks-raw"
View Source
const MAX_EL_BLOCK_NUMBER = int64(1_000_000_000_000 - 1)
Variables ¶
View Source
var ErrMethodNotSupported = fmt.Errorf("method not supported")
View Source
var ErrNotFoundInCache = fmt.Errorf("cannot find hash in cache")
Functions ¶
This section is empty.
Types ¶
type BigTableEthRaw ¶
type BigTableEthRaw struct {
// contains filtered or unexported fields
}
func NewBigTableEthRaw ¶
func NewBigTableEthRaw(db RawStoreReader, chainID uint64) *BigTableEthRaw
func (*BigTableEthRaw) BlockByNumber ¶
func (*BigTableEthRaw) BlockReceipts ¶
func (*BigTableEthRaw) TraceBlockByNumber ¶
func (*BigTableEthRaw) UncleByBlockHashAndIndex ¶
func (*BigTableEthRaw) UncleByBlockNumberAndIndex ¶
type Bytes ¶
type Bytes []byte
Bytes marshals/unmarshals as a JSON string with 0x prefix. The empty slice marshals as "0x".
func (*Bytes) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type CachedRawStore ¶
type CachedRawStore struct {
// contains filtered or unexported fields
}
func WithCache ¶
func WithCache(reader RawStoreReader) *CachedRawStore
func (*CachedRawStore) ReadBlockByHash ¶
func (c *CachedRawStore) ReadBlockByHash(chainID uint64, hash string) (*FullBlockRawData, error)
func (*CachedRawStore) ReadBlockByNumber ¶
func (c *CachedRawStore) ReadBlockByNumber(chainID uint64, number int64) (*FullBlockRawData, error)
func (*CachedRawStore) ReadBlocksByNumber ¶
func (c *CachedRawStore) ReadBlocksByNumber(chainID uint64, start, end int64) ([]*FullBlockRawData, error)
type FullBlockRawData ¶
type MinimalBlock ¶
type MinimalBlock struct {
Result struct {
Hash string `json:"hash"`
} `json:"result"`
}
type RawStore ¶
type RawStore struct {
// contains filtered or unexported fields
}
func NewRawStore ¶
func (RawStore) AddBlocks ¶
func (db RawStore) AddBlocks(blocks []FullBlockRawData) error
func (RawStore) ReadBlockByHash ¶
func (db RawStore) ReadBlockByHash(chainID uint64, hash string) (*FullBlockRawData, error)
func (RawStore) ReadBlockByNumber ¶
func (db RawStore) ReadBlockByNumber(chainID uint64, number int64) (*FullBlockRawData, error)
func (RawStore) ReadBlocksByNumber ¶
func (db RawStore) ReadBlocksByNumber(chainID uint64, start, end int64) ([]*FullBlockRawData, error)
type RawStoreReader ¶
type RawStoreReader interface {
ReadBlockByNumber(chainID uint64, number int64) (*FullBlockRawData, error)
ReadBlockByHash(chainID uint64, hash string) (*FullBlockRawData, error)
ReadBlocksByNumber(chainID uint64, start, end int64) ([]*FullBlockRawData, error)
}
type WithFallback ¶
type WithFallback struct {
// contains filtered or unexported fields
}
func NewWithFallback ¶
func NewWithFallback(roundTripper, fallback http.RoundTripper) *WithFallback
Click to show internal directories.
Click to hide internal directories.