MCPcopy
hub / github.com/uber-go/nilaway / activateControlledTriggers

Method activateControlledTriggers

inference/engine.go:474–480  ·  view source on GitHub ↗

activateControlledTriggers checks if the site has proper value and activates all the triggers controlled by the site `site` if so. This method should be called whenever a site is determined to be a new value.

(site primitiveSite, siteExplained ExplainedBool)

Source from the content-addressed store, hash-verified

472// controlled by the site `site` if so. This method should be called whenever a site is determined
473// to be a new value.
474func (e *Engine) activateControlledTriggers(site primitiveSite, siteExplained ExplainedBool) {
475 if controlledTgs, ok := e.controlledTriggersBySite[site]; ok && siteExplained.Val() {
476 for tg := range controlledTgs {
477 e.buildFromSingleFullTrigger(tg)
478 }
479 }
480}
481
482// observeImplication augments the inferred map with a new implication discovered as
483// the result of an assertion. In particular, we note that all assertions discovered as FullTriggers

Calls 2

ValMethod · 0.65

Tested by

no test coverage detected