mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-25 01:13:40 +01:00
Update storage/memory.go
Co-authored-by: Chris C. <twin@twinnation.org>
This commit is contained in:
parent
fb5477f50b
commit
7f647305ce
@ -24,7 +24,7 @@ func NewInMemoryStore() *InMemoryStore {
|
|||||||
|
|
||||||
// GetAll returns all the observed results for all services from the in memory store
|
// GetAll returns all the observed results for all services from the in memory store
|
||||||
func (ims *InMemoryStore) GetAll() map[string]*core.ServiceStatus {
|
func (ims *InMemoryStore) GetAll() map[string]*core.ServiceStatus {
|
||||||
results := make(map[string]*core.ServiceStatus)
|
results := make(map[string]*core.ServiceStatus, len(ims.serviceStatuses))
|
||||||
ims.serviceResultsMutex.RLock()
|
ims.serviceResultsMutex.RLock()
|
||||||
for key, svcStatus := range ims.serviceStatuses {
|
for key, svcStatus := range ims.serviceStatuses {
|
||||||
copiedResults := copyResults(svcStatus.Results)
|
copiedResults := copyResults(svcStatus.Results)
|
||||||
|
Loading…
Reference in New Issue
Block a user