// GatherPools collects information about all resource pools which provide // devices that are accessible from the given node. // // Out-dated slices are silently ignored. Pools may be incomplete (not all // required slices available) or invalid (for example, device names not unique). // Both is recorded in the result. func GatherPools(ctx context.Context, sliceLister resourcelisters.ResourceSliceLister, node *v1.Node) ([]*Pool, error) { … } func addSlice(pools map[PoolID]*Pool, slice *resourceapi.ResourceSlice) { … } func poolIsInvalid(pool *Pool) (bool, string) { … } type Pool … type PoolID … func (p PoolID) String() string { … } type DeviceID … func (d DeviceID) String() string { … }