cache

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2021 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DATABASE_NAME                 = "CACHE_DATABASE_NAME"
	DATABASE_HOSTNAME             = "CACHE_DATABASE_HOSTNAME"
	DATABASE_PORT                 = "CACHE_DATABASE_PORT"
	DATABASE_USER                 = "CACHE_DATABASE_USER"
	DATABASE_PASSWORD             = "CACHE_DATABASE_PASSWORD"
	DATABASE_MAX_IDLE_CONNECTIONS = "CACHE_DATABASE_MAX_IDLE_CONNECTIONS"
	DATABASE_MAX_OPEN_CONNECTIONS = "CACHE_DATABASE_MAX_OPEN_CONNECTIONS"
	DATABASE_MAX_CONN_LIFETIME    = "CACHE_DATABASE_MAX_CONN_LIFETIME"
)

Env variables

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service for saving trace data

func New

func New() (*Service, error)

New create new service

func (*Service) SaveTxTraceGraph

func (srv *Service) SaveTxTraceGraph(data *TxTraceGraph) error

SaveTxTraceGraph save callstack to database

func (*Service) UpsertTX

func (srv *Service) UpsertTX(tx *sqlx.Tx, txHash string, txIndex uint64, bHash string, bNumber uint64) (uint64, error)

UpsertTX update information about transaction

type TxTraceGraph

type TxTraceGraph struct {
	TxHash      common.Hash    `json:"txHash"`
	TxIndex     uint64         `json:"txIndex"`
	BlockHash   common.Hash    `json:"blockHash"`
	BlockNumber uint64         `json:"blockNumber"`
	Frames      []tracer.Frame `json:"frames"`
}

TxTraceGraph information about callstack

Jump to

Keyboard shortcuts

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