Documentation
¶
Index ¶
- func Abs(x any) (decimal.Decimal, error)
- func Add(x, y any) (decimal.Decimal, error)
- func Avg(x ...any) (decimal.Decimal, error)
- func Ceil(x any) (decimal.Decimal, error)
- func Div(x, y any) (decimal.Decimal, error)
- func Equal(x, y any) (bool, error)
- func Floor(x any) (decimal.Decimal, error)
- func GreaterThan(x, y any) (bool, error)
- func GreaterThanOrEqual(x, y any) (bool, error)
- func IsNegative(x any) (bool, error)
- func IsPositive(x any) (bool, error)
- func IsZero(x any) (bool, error)
- func LessThan(x, y any) (bool, error)
- func LessThanOrEqual(x, y any) (bool, error)
- func Ln(x any) (decimal.Decimal, error)
- func Log(x, y any) (decimal.Decimal, error)
- func Max(x ...any) (decimal.Decimal, error)
- func Min(x ...any) (decimal.Decimal, error)
- func Mul(x, y any) (decimal.Decimal, error)
- func NewEnv(observationTimestampNanoseconds uint64) environment
- func ParseDuration(x string) (time.Duration, error)
- func Pow(x, y any) (decimal.Decimal, error)
- func ProcessCalculatedStreams(lggr logger.Logger, channelDefinitions llotypes.ChannelDefinitions, ...)
- func ProcessCalculatedStreamsDryRun(expression string) error
- func Round(x any, precision int) (decimal.Decimal, error)
- func Sqrt(x any) (decimal.Decimal, error)
- func Sub(x, y any) (decimal.Decimal, error)
- func Truncate(x any, precision int) (decimal.Decimal, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GreaterThan ¶
GreaterThan returns true if x is greater than y
func GreaterThanOrEqual ¶
GreaterThanOrEqual returns true if x is greater than or equal to y
func LessThanOrEqual ¶
LessThanOrEqual returns true if x is less than or equal to y
func Log ¶
Log returns the logarithms of y with base x. This is equivalent to log_x(y).
We use this formula:
ln(y)
log_x(y) = ----
ln(x)
func NewEnv ¶
func NewEnv(observationTimestampNanoseconds uint64) environment
NewEnv returns a new environment with the default functions
func ParseDuration ¶
ParseDuration parses a duration string into a time.ParseDuration
func ProcessCalculatedStreams ¶
func ProcessCalculatedStreams(lggr logger.Logger, channelDefinitions llotypes.ChannelDefinitions, streamAggregates protocol.StreamAggregates, observationTimestampNanoseconds uint64, optsCache *protocol.OptsCache)
ProcessCalculatedStreams evaluates expressions for each channel of the EVMABIEncodeUnpackedExpr format, appending the calculated streams to their channel definitions and writing the evaluated values into streamAggregates. It is version-agnostic: both the v30 and v31 plugins call it with their own outcome/precursor fields.
func ProcessCalculatedStreamsDryRun ¶
ProcessCalculatedStreamsDryRun processes the calculated streams for the given expression against synthetic inputs and returns an error if it cannot be evaluated. Useful for validating expressions.
Types ¶
This section is empty.