feat: runtime manager

This commit is contained in:
Ilia Denisov
2026-04-28 20:39:18 +02:00
committed by GitHub
parent e0a99b346b
commit a7cee15115
289 changed files with 45660 additions and 2207 deletions
@@ -0,0 +1,22 @@
package ports
import (
"context"
"galaxy/rtmanager/internal/domain/health"
)
// HealthSnapshotStore stores the latest technical-health observation per
// game. Adapters keep one row per game_id; later observations overwrite.
type HealthSnapshotStore interface {
// Upsert installs snapshot as the latest observation for
// snapshot.GameID. Adapters validate snapshot through
// health.HealthSnapshot.Validate before touching the store.
Upsert(ctx context.Context, snapshot health.HealthSnapshot) error
// Get returns the latest snapshot for gameID. It returns
// runtime.ErrNotFound (declared in
// `galaxy/rtmanager/internal/domain/runtime`) when no snapshot has
// been recorded yet.
Get(ctx context.Context, gameID string) (health.HealthSnapshot, error)
}