26 lines
1.1 KiB
Go
26 lines
1.1 KiB
Go
package ports
|
|
|
|
import "context"
|
|
|
|
// RuntimeManager publishes runtime jobs to Runtime Manager via Redis
|
|
// Streams. introduces start and stop jobs; future stages may
|
|
// extend the surface.
|
|
//
|
|
// The interface is intentionally narrow: callers pass only the game id.
|
|
// Runtime Manager fetches additional context (target engine version,
|
|
// turn schedule, etc.) through Lobby's internal HTTP API when it picks
|
|
// up the job.
|
|
type RuntimeManager interface {
|
|
// PublishStartJob enqueues one start job for gameID. Implementations
|
|
// must produce one event in the configured runtime start jobs stream
|
|
// per call. A zero-error return means the event is durably accepted
|
|
// into the stream (Redis XADD succeeded); it does not imply that the
|
|
// container has started.
|
|
PublishStartJob(ctx context.Context, gameID string) error
|
|
|
|
// PublishStopJob enqueues one stop job for gameID. Implementations
|
|
// must produce one event in the configured runtime stop jobs stream
|
|
// per call. The same durability semantics as PublishStartJob apply.
|
|
PublishStopJob(ctx context.Context, gameID string) error
|
|
}
|