eth

package
v0.0.0-...-0e5ff0a Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Balance

type Balance struct {
	Id      string `json:"id"`
	Label   string `json:"label"`
	Balance string `json:"balance"`
}

type BlockCacheEvent

type BlockCacheEvent struct {
	Fork     bool
	Size     float64 `json:"block_size"`
	Gas      float64 `json:"block_gas"`
	GasLimit float64 `json:"block_gas_limit"`
	Usage    float64 `json:"block_usage"`
	Interval uint64

	Miner        string
	Transactions []*TxEvent
	poller.BlockEvent
	// contains filtered or unexported fields
}

func (*BlockCacheEvent) Hash

func (blockEvent *BlockCacheEvent) Hash() string

func (*BlockCacheEvent) Number

func (blockEvent *BlockCacheEvent) Number() *big.Int

func (*BlockCacheEvent) ParentHash

func (blockEvent *BlockCacheEvent) ParentHash() string

func (*BlockCacheEvent) SetFork

func (blockEvent *BlockCacheEvent) SetFork(fork bool)

func (*BlockCacheEvent) Timestamp

func (blockEvent *BlockCacheEvent) Timestamp() uint64

type Cache

type Cache struct {
	*metrics.RawCache
	Tracking *Tracking

	poller.Connector
	// contains filtered or unexported fields
}

func NewCache

func NewCache(client *ethclient.Client, configFile string, backupFile string, restore bool, backupFrequency int64) *Cache

func (*Cache) Apply

func (cache *Cache) Apply(event interface{})

func (*Cache) Revert

func (cache *Cache) Revert(event interface{})

func (*Cache) SetReady

func (cache *Cache) SetReady()

type EthBlockEvent

type EthBlockEvent interface {
	poller.BlockEvent
	ParentHash() string
	Hash() string
	SetFork(bool)
}

type ExporterCache

type ExporterCache struct {
	*Cache

	Fetcher *utils.Fetcher
	// contains filtered or unexported fields
}

func NewExporterCache

func NewExporterCache(client *ethclient.Client, fetcher *utils.Fetcher, configFile string, backupFile string, restore bool, backupFrequency int64) *ExporterCache

func (*ExporterCache) Apply

func (cache *ExporterCache) Apply(event interface{})

func (*ExporterCache) Collect

func (cache *ExporterCache) Collect(ch chan<- prometheus.Metric)

func (*ExporterCache) Describe

func (cache *ExporterCache) Describe(ch chan<- *prometheus.Desc)

func (*ExporterCache) Revert

func (cache *ExporterCache) Revert(event interface{})

func (*ExporterCache) SetReady

func (cache *ExporterCache) SetReady()

type ForkWatcher

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

func NewForkWatcher

func NewForkWatcher(connector poller.Connector, maxForkSize int) *ForkWatcher

type Measure

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

func NewMeasure

func NewMeasure(name string, desc string, valueType prometheus.ValueType, value float64, labels map[string]interface{}) *Measure

type Miner

type Miner struct {
	metrics.Stats
	Id           string `json:"id"`
	Label        string `json:"label"`
	CurrentBlock string `json:"currentBlock"`
}

func NewMiner

func NewMiner(key string, id string) *Miner

type Processor

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

func NewProcessor

func NewProcessor(client *ethclient.Client, fork *ForkWatcher) *Processor

func (*Processor) NewBlockEvent

func (processor *Processor) NewBlockEvent(number *big.Int, parentHash string, hash string) poller.BlockEvent

func (*Processor) Process

func (processor *Processor) Process(obj interface{}, event poller.BlockEvent, listening bool)

type Tracking

type Tracking struct {
	Events   []*metrics.Event `json:"events"`
	Miners   []*Miner         `json:"miners"`
	Balances []*Balance       `json:"balances"`
}

type TxEvent

type TxEvent struct {
	Sender     string
	Receiver   string
	Value      *big.Int
	FunctionId string
	Events     []string
	Deploy     string
}

Jump to

Keyboard shortcuts

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