lang: funcs: dage: Add a Graph method to improve the API

This also adds it to the GraphAPI so that users of it can pull out a
graph when needed. It's not likely to be used by the dage engine
consumers.
This commit is contained in:
James Shubin
2024-01-22 13:57:34 -05:00
parent dd20bd5486
commit 20c8a856a2
4 changed files with 16 additions and 1 deletions

View File

@@ -262,6 +262,9 @@ type GraphAPI interface {
HasVertex(Func) bool
FindEdge(Func, Func) *FuncEdge
LookupEdge(*FuncEdge) (Func, Func, bool)
// Graph returns a copy of the current graph.
Graph() *pgraph.Graph
}
// Txn is the interface that the engine graph API makes available so that