X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/c3c538444c15e68e96780f157935f2baa4ba0bc5..1e3eacb0ca6f2228f50f13514c7577a149a707e6:/lib/dispatchcloud/scheduler/interfaces.go diff --git a/lib/dispatchcloud/scheduler/interfaces.go b/lib/dispatchcloud/scheduler/interfaces.go index bdb8678e9f..78f8c804e2 100644 --- a/lib/dispatchcloud/scheduler/interfaces.go +++ b/lib/dispatchcloud/scheduler/interfaces.go @@ -7,13 +7,14 @@ package scheduler import ( "time" - "git.curoverse.com/arvados.git/lib/dispatchcloud/container" - "git.curoverse.com/arvados.git/lib/dispatchcloud/worker" - "git.curoverse.com/arvados.git/sdk/go/arvados" + "git.arvados.org/arvados.git/lib/dispatchcloud/container" + "git.arvados.org/arvados.git/lib/dispatchcloud/worker" + "git.arvados.org/arvados.git/sdk/go/arvados" ) // A ContainerQueue is a set of containers that need to be started or -// stopped. Implemented by container.Queue and test stubs. +// stopped. Implemented by container.Queue and test stubs. See +// container.Queue method documentation for details. type ContainerQueue interface { Entries() (entries map[string]container.QueueEnt, updated time.Time) Lock(uuid string) error @@ -21,20 +22,24 @@ type ContainerQueue interface { Cancel(uuid string) error Forget(uuid string) Get(uuid string) (arvados.Container, bool) + Subscribe() <-chan struct{} + Unsubscribe(<-chan struct{}) + Update() error } // A WorkerPool asynchronously starts and stops worker VMs, and starts // and stops containers on them. Implemented by worker.Pool and test -// stubs. +// stubs. See worker.Pool method documentation for details. type WorkerPool interface { Running() map[string]time.Time Unallocated() map[arvados.InstanceType]int - Workers() map[worker.State]int + CountWorkers() map[worker.State]int AtQuota() bool - Create(arvados.InstanceType) error + Create(arvados.InstanceType) bool Shutdown(arvados.InstanceType) bool StartContainer(arvados.InstanceType, arvados.Container) bool - KillContainer(uuid string) + KillContainer(uuid, reason string) bool + ForgetContainer(uuid string) Subscribe() <-chan struct{} Unsubscribe(<-chan struct{}) }