feat(edge): edgeStacks and edgeJobs operations small refactors [EE-2744] (#6648)

This commit is contained in:
Marcelo Rydel
2022-04-08 11:27:38 -03:00
committed by GitHub
parent 6419e7740a
commit f12c3968f1
9 changed files with 52 additions and 59 deletions

View File

@@ -58,3 +58,14 @@ func FilterByExcludeIDs(endpoints []portainer.Endpoint, excludeIds []portainer.E
}
return filteredEndpoints
}
// EndpointSet receives an environment(endpoint) array and returns a set
func EndpointSet(endpointIDs []portainer.EndpointID) map[portainer.EndpointID]bool {
set := map[portainer.EndpointID]bool{}
for _, endpointID := range endpointIDs {
set[endpointID] = true
}
return set
}