1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-12-15 08:16:43 +00:00

support stop

This commit is contained in:
2019-04-18 17:25:37 +08:00
parent 1504c71fb4
commit 549e559a73
5 changed files with 43 additions and 9 deletions

View File

@@ -2,12 +2,12 @@ package main
import (
"sync"
)
)
type ResourcePool struct {
mu sync.Mutex
nodes map[int]NodeStatus
nodes map[string]NodeStatus
}
func (pool *ResourcePool) update(node NodeStatus) {
@@ -27,7 +27,7 @@ func (pool *ResourcePool) update(node NodeStatus) {
//log.Println(pool.nodes)
}
func (pool *ResourcePool) getByID(id int) NodeStatus {
func (pool *ResourcePool) getByID(id string) NodeStatus {
pool.mu.Lock()
defer pool.mu.Unlock()