Documentation
¶
Index ¶
- type Config
- type IDGenerator
- type Option
- type Service
- func (s *Service) AdvanceGeneration(ctx context.Context, sessionID string) (int64, int, error)
- func (s *Service) Cancel(ctx context.Context, sessionID string, entryID string) (store.SessionInputQueueEntry, error)
- func (s *Service) ClaimNext(ctx context.Context, sessionID string) (store.SessionInputQueueEntry, bool, error)
- func (s *Service) ConsumeSteer(ctx context.Context, sessionID string) (store.SessionInputQueueEntry, bool, error)
- func (s *Service) CurrentGeneration(ctx context.Context, sessionID string) (int64, error)
- func (s *Service) Enqueue(ctx context.Context, sessionID string, text string, generation int64) (store.SessionInputQueueEntry, int, error)
- func (s *Service) MarkFailed(ctx context.Context, sessionID string, entryID string, summary string) error
- func (s *Service) MarkSent(ctx context.Context, sessionID string, entryID string) error
- func (s *Service) Release(ctx context.Context, sessionID string, entryID string) error
- func (s *Service) StageSteer(ctx context.Context, sessionID string, text string, generation int64) (store.SessionInputQueueEntry, error)
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Service)
Option customizes a Service.
func WithIDGenerator ¶
func WithIDGenerator(generator IDGenerator) Option
WithIDGenerator injects deterministic queue ids.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service owns validation and admission policy for session busy input.
func (*Service) AdvanceGeneration ¶
AdvanceGeneration fences older entries and returns the new generation.
func (*Service) Cancel ¶
func (s *Service) Cancel(ctx context.Context, sessionID string, entryID string) (store.SessionInputQueueEntry, error)
Cancel cancels one pending queue entry.
func (*Service) ClaimNext ¶
func (s *Service) ClaimNext( ctx context.Context, sessionID string, ) (store.SessionInputQueueEntry, bool, error)
ClaimNext leases the next input eligible for dispatch.
func (*Service) ConsumeSteer ¶
func (s *Service) ConsumeSteer( ctx context.Context, sessionID string, ) (store.SessionInputQueueEntry, bool, error)
ConsumeSteer atomically consumes the current staged steer entry, if any.
func (*Service) CurrentGeneration ¶
CurrentGeneration reads the current persisted generation for queue fencing.
func (*Service) Enqueue ¶
func (s *Service) Enqueue( ctx context.Context, sessionID string, text string, generation int64, ) (store.SessionInputQueueEntry, int, error)
Enqueue appends operator input behind the active prompt turn.
func (*Service) MarkFailed ¶
func (s *Service) MarkFailed(ctx context.Context, sessionID string, entryID string, summary string) error
MarkFailed records failed dispatch.
type Store ¶
type Store interface {
store.SessionInputQueueStore
}
Store is the persistence boundary for busy input.
Click to show internal directories.
Click to hide internal directories.