18 lines
384 B
Go
18 lines
384 B
Go
package pool
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
)
|
|
|
|
type InventorySnapshot struct {
|
|
Managed int
|
|
AvailableSlots int64
|
|
}
|
|
|
|
type InventoryReader interface {
|
|
// ReadInventory returns a bounded, authoritative aggregate. Unknown Worker
|
|
// runtime must reduce capacity rather than being treated as idle.
|
|
ReadInventory(context.Context, string, time.Duration) (InventorySnapshot, error)
|
|
}
|