func (r *registry) deregisterControls() { controls.Rm(StopContainer) controls.Rm(StartContainer) controls.Rm(RestartContainer) controls.Rm(PauseContainer) controls.Rm(UnpauseContainer) controls.Rm(AttachContainer) controls.Rm(ExecContainer) }
func TestControls(t *testing.T) { controls.Register("foo", func(req xfer.Request) xfer.Response { return xfer.Response{ Value: "bar", } }) defer controls.Rm("foo") want := xfer.Response{ Value: "bar", } have := controls.HandleControlRequest(xfer.Request{ Control: "foo", }) if !reflect.DeepEqual(want, have) { t.Fatal(test.Diff(want, have)) } }
func (r *Reporter) deregisterControls() { controls.Rm(GetLogs) controls.Rm(DeletePod) controls.Rm(ScaleUp) controls.Rm(ScaleDown) }
func (*Reporter) deregisterControls() { controls.Rm(ExecHost) }