MCPcopy Create free account
hub / github.com/cel-expr/cel-go / trackNetworkContainsIPStringCost

Function trackNetworkContainsIPStringCost

ext/network.go:763–769  ·  view source on GitHub ↗
(args []ref.Val, result ref.Val)

Source from the content-addressed store, hash-verified

761}
762
763func trackNetworkContainsIPStringCost(args []ref.Val, result ref.Val) *uint64 {
764 cidrSize := cost.ActualSize(args[0])
765 otherSize := cost.ActualSize(args[1])
766 total := cost.SafeMultiplyByFactor(cost.SafeAdd(cidrSize, cidrSize), cost.StringCostFactor)
767 total = cost.SafeAdd(total, cost.SafeMultiplyByFactor(otherSize, cost.StringCostFactor))
768 return &total
769}
770
771func trackNetworkContainsCIDRCIDRCost(args []ref.Val, result ref.Val) *uint64 {
772 cidrSize := cost.ActualSize(args[0])

Callers

nothing calls this directly

Calls 3

ActualSizeFunction · 0.92
SafeMultiplyByFactorFunction · 0.92
SafeAddFunction · 0.92

Tested by

no test coverage detected