metrics

package
v0.0.0-...-9bf9f52 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunVaaCount

func RunVaaCount(inputFile, outputFile string)

func RunVaaVolumeFromFile

func RunVaaVolumeFromFile(inputFile, outputFile, pricesFile, vaaPayloadParserURL, p2pNetwork string)

read a csv file with VAAs and convert into a decoded csv file ready to upload to the database

func RunVaaVolumeFromMongo

func RunVaaVolumeFromMongo(mongoUri, mongoDb, outputFile, pricesFile, vaaPayloadParserURL, p2pNetwork string)

read a csv file with VAAs and convert into a decoded csv file ready to upload to the database

Types

type LineParser

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

func NewLineParser

func NewLineParser(converter *VaaConverter) *LineParser

func (*LineParser) ParseLine

func (lp *LineParser) ParseLine(ctx context.Context, line []byte) (string, error)

ParseLine takes a CSV line as input, and generates a line protocol entry as output.

The format for InfluxDB line protocol is: vaa,tags fields timestamp

type VaaConverter

type VaaConverter struct {
	MissingTokens            map[sdk.Address]sdk.ChainID
	MissingTokensCounter     map[sdk.Address]int
	PriceCache               *prices.CoinPricesCache
	Metrics                  metrics.Metrics
	GetTransferredTokenByVaa token.GetTransferredTokenByVaa
	TokenProvider            *domain.TokenProvider
}

func NewVaaConverter

func NewVaaConverter(priceCache *prices.CoinPricesCache, GetTransferredTokenByVaa token.GetTransferredTokenByVaa, tokenProvider *domain.TokenProvider) *VaaConverter

func (*VaaConverter) Convert

func (c *VaaConverter) Convert(ctx context.Context, vaaBytes []byte) (string, error)

Jump to

Keyboard shortcuts

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