MCPcopy Create free account
hub / github.com/PatchMon/PatchMon / SetHostGroupsBulk

Method SetHostGroupsBulk

server-source-code/internal/store/hosts.go:365–372  ·  view source on GitHub ↗

SetHostGroupsBulk updates group memberships for multiple hosts.

(ctx context.Context, hostIDs, groupIDs []string)

Source from the content-addressed store, hash-verified

363
364// SetHostGroupsBulk updates group memberships for multiple hosts.
365func (s *HostsStore) SetHostGroupsBulk(ctx context.Context, hostIDs, groupIDs []string) error {
366 for _, hid := range hostIDs {
367 if err := s.SetHostGroups(ctx, hid, groupIDs); err != nil {
368 return err
369 }
370 }
371 return nil
372}
373
374// HostPackageStats holds package counts for a host (for scoped API include=stats).
375type HostPackageStats struct {

Callers 1

BulkUpdateGroupsMethod · 0.80

Calls 1

SetHostGroupsMethod · 0.95

Tested by

no test coverage detected