built-ins: add graph.reachable_paths (#4205)

This new built-in functionality allows callers to find all reachable
paths in a graph based on an array or set of root nodes. See the
updates to policy-reference.md for more details and usage information.

Signed-off-by: Justin Lindh <justin.lindh@webfilings.com>
This commit is contained in:
Justin Lindh
2022-01-17 01:31:31 -07:00
committed by GitHub
parent 4700768448
commit 258501134d
5 changed files with 368 additions and 1 deletions
+59
View File
@@ -979,6 +979,65 @@
"type": "function"
}
},
{
"name": "graph.reachable_paths",
"decl": {
"args": [
{
"dynamic": {
"key": {
"type": "any"
},
"value": {
"of": [
{
"dynamic": {
"type": "any"
},
"type": "array"
},
{
"of": {
"type": "any"
},
"type": "set"
}
],
"type": "any"
}
},
"type": "object"
},
{
"of": [
{
"dynamic": {
"type": "any"
},
"type": "array"
},
{
"of": {
"type": "any"
},
"type": "set"
}
],
"type": "any"
}
],
"result": {
"of": {
"dynamic": {
"type": "any"
},
"type": "array"
},
"type": "set"
},
"type": "function"
}
},
{
"name": "gt",
"decl": {