Skip to content

Commit 2eefd56

Browse files
committed
[core] Support agent cache count
1 parent d91c876 commit 2eefd56

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

core/task/agentcache.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,11 @@ func (ac *AgentCache) Get(id mesos.AgentID) (agent *AgentCacheInfo) {
6969
agent = &aci
7070
}
7171
return
72+
}
73+
74+
func (ac *AgentCache) Count() (count int) {
75+
if ac == nil || ac.store == nil {
76+
return 0
77+
}
78+
return len(ac.store)
7279
}

0 commit comments

Comments
 (0)