Make this chain to be root. Chain's parent field is cleared. Failures wont be propagated to the upper chains anymore.
()
| 186 | // Chain's parent field is cleared. |
| 187 | // Failures wont be propagated to the upper chains anymore. |
| 188 | func (c *chain) setRoot() { |
| 189 | c.mu.Lock() |
| 190 | defer c.mu.Unlock() |
| 191 | |
| 192 | if chainValidation && c.state == stateLeaved { |
| 193 | panic("can't use chain after leave") |
| 194 | } |
| 195 | |
| 196 | c.parent = nil |
| 197 | } |
| 198 | |
| 199 | // Set severity of reported failures. |
| 200 | // Chain always overrides failure severity with configured one. |