-
Notifications
You must be signed in to change notification settings - Fork 1
/
DependencyVertex.go
115 lines (96 loc) · 2.41 KB
/
DependencyVertex.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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 a vertex in the graph.
//
// The value of each vertex is an `IConstruct` that is accessible via the `.value` getter.
type DependencyVertex interface {
// Returns the parents of the vertex (i.e dependants).
Inbound() *[]DependencyVertex
// Returns the children of the vertex (i.e dependencies).
Outbound() *[]DependencyVertex
// Returns the IConstruct this graph vertex represents.
//
// `null` in case this is the root of the graph.
Value() constructs.IConstruct
// Adds a vertex as a dependency of the current node.
//
// Also updates the parents of `dep`, so that it contains this node as a parent.
//
// This operation will fail in case it creates a cycle in the graph.
AddChild(dep DependencyVertex)
// Returns a topologically sorted array of the constructs in the sub-graph.
Topology() *[]constructs.IConstruct
}
// The jsii proxy struct for DependencyVertex
type jsiiProxy_DependencyVertex struct {
_ byte // padding
}
func (j *jsiiProxy_DependencyVertex) Inbound() *[]DependencyVertex {
var returns *[]DependencyVertex
_jsii_.Get(
j,
"inbound",
&returns,
)
return returns
}
func (j *jsiiProxy_DependencyVertex) Outbound() *[]DependencyVertex {
var returns *[]DependencyVertex
_jsii_.Get(
j,
"outbound",
&returns,
)
return returns
}
func (j *jsiiProxy_DependencyVertex) Value() constructs.IConstruct {
var returns constructs.IConstruct
_jsii_.Get(
j,
"value",
&returns,
)
return returns
}
func NewDependencyVertex(value constructs.IConstruct) DependencyVertex {
_init_.Initialize()
j := jsiiProxy_DependencyVertex{}
_jsii_.Create(
"cdk8s.DependencyVertex",
[]interface{}{value},
&j,
)
return &j
}
func NewDependencyVertex_Override(d DependencyVertex, value constructs.IConstruct) {
_init_.Initialize()
_jsii_.Create(
"cdk8s.DependencyVertex",
[]interface{}{value},
d,
)
}
func (d *jsiiProxy_DependencyVertex) AddChild(dep DependencyVertex) {
if err := d.validateAddChildParameters(dep); err != nil {
panic(err)
}
_jsii_.InvokeVoid(
d,
"addChild",
[]interface{}{dep},
)
}
func (d *jsiiProxy_DependencyVertex) Topology() *[]constructs.IConstruct {
var returns *[]constructs.IConstruct
_jsii_.Invoke(
d,
"topology",
nil, // no parameters
&returns,
)
return returns
}