MCPcopy Create free account
hub / github.com/codnect/procyon / Conditional

Method Conditional

component/component.go:72–75  ·  view source on GitHub ↗

Conditional attaches a runtime condition to the component. The condition is evaluated before the component is loaded into the container.

(cond Condition)

Source from the content-addressed store, hash-verified

70// Conditional attaches a runtime condition to the component.
71// The condition is evaluated before the component is loaded into the container.
72func (r *Registration) Conditional(cond Condition) *Registration {
73 r.component.attachCondition(cond)
74 return r
75}
76
77// Register registers a new component using the given constructor function and optional definition options.
78// It panics if the component name already exists or if definition creation fails.

Callers 3

TestRegisterFunction · 0.80
TestListFunction · 0.80

Calls 1

attachConditionMethod · 0.80

Tested by 3

TestRegisterFunction · 0.64
TestListFunction · 0.64