// Package inventory is the Redis-backed stock + reservation service. // // Two distinct services coexist in this package and they are NOT // redundant; they exist for different callers: // // - redis_service.go — stock levels and basic get/batch/reserve. // - redis_reservation_service.go — cart-shaped reservations (with release // + available-quantity semantics, used by // go-cart-actor via the adapter). // // `Level` (level.go) is the canonical shape returned by readers and // accepted by writers; it is reused across both services. // // adapter.go bridges to platform/inventory.ReservationPolicy so other // services depend on the platform interface, not on this package. // // listener.go subscribes to the inventory_changed Redis pub/sub channel // and mirrors upstream events into the local cache. // // Request and reservation DTOs (CartReserveRequest, ReserveRequest, // CartID, ReservationStatus, ReservationSummary) now live in // request_types.go. Storage types (InventoryItem, InventoryReference, // InventoryResult) remain in types.go. When adding a new request shape, // put it in request_types.go; when adding a new storage shape, put it // in types.go. package inventory