MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / RegisterNetworkFunctions

Function RegisterNetworkFunctions

codelab/network_functions.cc:523–541  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

521}
522
523absl::Status RegisterNetworkFunctions(cel::FunctionRegistry& registry,
524 const cel::RuntimeOptions& options) {
525 // TODO(uncreated-issue/86): remaining functions
526 auto s = cel::UnaryFunctionAdapter<cel::Value, const cel::StringValue&>::
527 RegisterGlobalOverload("net.parseAddress", &parseAddress, registry);
528 s.Update(cel::UnaryFunctionAdapter<cel::Value, const cel::StringValue&>::
529 RegisterGlobalOverload("net.parseAddressOrZero",
530 &parseAddressOrZero, registry));
531
532 s.Update(cel::UnaryFunctionAdapter<cel::Value, const cel::StringValue&>::
533 RegisterGlobalOverload("net.parseAddressMatcher",
534 &parseAddressMatcher, registry));
535 s.Update(cel::BinaryFunctionAdapter<
536 cel::Value, const cel::OpaqueValue&,
537 const cel::OpaqueValue&>::RegisterMemberOverload("containsAddress",
538 &containsAddress,
539 registry));
540 return s;
541}
542
543} // namespace cel_codelab

Callers 3

TEST_PFunction · 0.85
CreateMethod · 0.85
ConfigureRuntimeFunction · 0.85

Calls

no outgoing calls

Tested by 2

TEST_PFunction · 0.68
CreateMethod · 0.68