1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 13:29:41 +02:00

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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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
}