// handleOverride processes an Override. func (v *vserver) handleOverride(o seesaw.Override) { switch override := o.(type) { case *seesaw.VserverOverride: if v.vserverOverride == *override { // No change return } v.vserverOverride = *override if vserverEnabled(v.config, o.State()) == v.enabled { // enable state not changed - nothing to do return } // TODO(angusc): handle backend and destination overrides. default: return } if v.config != nil { v.handleConfigUpdate(v.config) } }
// handleOverride handles an incoming Override. func (e *Engine) handleOverride(o seesaw.Override) { e.overrides[o.Target()] = o e.distributeOverride(o) if o.State() == seesaw.OverrideDefault { delete(e.overrides, o.Target()) } }