-
Notifications
You must be signed in to change notification settings - Fork 1
/
DependencyGraph.go
86 lines (70 loc) · 1.94 KB
/
DependencyGraph.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
package cdk8s
import (
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
_init_ "github.com/cdk8s-team/cdk8s-core-go/cdk8s/jsii"
"github.com/aws/constructs-go/constructs/v3"
)
// Represents the dependency graph for a given Node.
//
// This graph includes the dependency relationships between all nodes in the
// node (construct) sub-tree who's root is this Node.
//
// Note that this means that lonely nodes (no dependencies and no dependants) are also included in this graph as
// childless children of the root node of the graph.
//
// The graph does not include cross-scope dependencies. That is, if a child on the current scope depends on a node
// from a different scope, that relationship is not represented in this graph.
type DependencyGraph interface {
// Returns the root of the graph.
//
// Note that this vertex will always have `null` as its `.value` since it is an artifical root
// that binds all the connected spaces of the graph.
Root() DependencyVertex
// See: Vertex.topology ()
//
Topology() *[]constructs.IConstruct
}
// The jsii proxy struct for DependencyGraph
type jsiiProxy_DependencyGraph struct {
_ byte // padding
}
func (j *jsiiProxy_DependencyGraph) Root() DependencyVertex {
var returns DependencyVertex
_jsii_.Get(
j,
"root",
&returns,
)
return returns
}
func NewDependencyGraph(node constructs.Node) DependencyGraph {
_init_.Initialize()
if err := validateNewDependencyGraphParameters(node); err != nil {
panic(err)
}
j := jsiiProxy_DependencyGraph{}
_jsii_.Create(
"cdk8s.DependencyGraph",
[]interface{}{node},
&j,
)
return &j
}
func NewDependencyGraph_Override(d DependencyGraph, node constructs.Node) {
_init_.Initialize()
_jsii_.Create(
"cdk8s.DependencyGraph",
[]interface{}{node},
d,
)
}
func (d *jsiiProxy_DependencyGraph) Topology() *[]constructs.IConstruct {
var returns *[]constructs.IConstruct
_jsii_.Invoke(
d,
"topology",
nil, // no parameters
&returns,
)
return returns
}