Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakePointForVaaCount ¶
MakePointForVaaCount generates a data point for the VAA count measurement.
Some VAAs will not generate a measurement, so the caller must always check whether the returned point is nil.
func MakePointForVaaVolume ¶
func MakePointForVaaVolume(params *MakePointForVaaVolumeParams) (*write.Point, error)
MakePointForVaaVolume builds the InfluxDB volume metric for a given VAA
Some VAAs will not generate a measurement, so the caller must always check whether the returned point is nil.
Types ¶
type MakePointForVaaVolumeParams ¶
type MakePointForVaaVolumeParams struct { // Vaa is the VAA for which we want to compute the volume metric Vaa *sdk.VAA // TokenPriceFunc returns the price of the given token at the specified timestamp. TokenPriceFunc func(symbol domain.Symbol, timestamp time.Time) (decimal.Decimal, error) // Logger is an optional parameter, in case the caller wants additional visibility. Logger *zap.Logger }
MakePointForVaaVolumeParams contains input parameters for the function `MakePointForVaaVolume`
type Metric ¶
type Metric struct {
// contains filtered or unexported fields
}
Metric definition.
Click to show internal directories.
Click to hide internal directories.