Both functions read and write to the same map. We should switch to sync.Map Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
13 lines
341 B
Go
13 lines
341 B
Go
package provider
|
|
|
|
import (
|
|
dbCommon "github.com/cloudbase/garm/database/common"
|
|
"github.com/cloudbase/garm/database/watcher"
|
|
)
|
|
|
|
func composeProviderWatcher() dbCommon.PayloadFilterFunc {
|
|
return watcher.WithAny(
|
|
watcher.WithEntityTypeFilter(dbCommon.InstanceEntityType),
|
|
watcher.WithEntityTypeFilter(dbCommon.ScaleSetEntityType),
|
|
)
|
|
}
|