SetHostGroupsBulk updates group memberships for multiple hosts.
(ctx context.Context, hostIDs, groupIDs []string)
| 363 | |
| 364 | // SetHostGroupsBulk updates group memberships for multiple hosts. |
| 365 | func (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). |
| 375 | type HostPackageStats struct { |
no test coverage detected