Esempio n. 1
0
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)
}
Esempio n. 2
0
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))
	}
}
Esempio n. 3
0
func (r *Reporter) deregisterControls() {
	controls.Rm(GetLogs)
	controls.Rm(DeletePod)
	controls.Rm(ScaleUp)
	controls.Rm(ScaleDown)
}
Esempio n. 4
0
func (*Reporter) deregisterControls() {
	controls.Rm(ExecHost)
}