Documentation
¶
Overview ¶
Package outputstore persists output independently of execution scheduling.
Index ¶
- Variables
- type Frame
- type Limits
- type Run
- type Store
- func (s *Store) Abandon(ctx context.Context, id uuid.UUID) error
- func (s *Store) AcceptTruncation(ctx context.Context, id uuid.UUID, end *pb.DebugletOutputEnd) error
- func (s *Store) Acknowledge(ctx context.Context, id uuid.UUID, sequence int64, end *pb.DebugletOutputEnd) error
- func (s *Store) Admit(ctx context.Context, id uuid.UUID, binding controlsession.Binding, ...) error
- func (s *Store) AdmitTx(ctx context.Context, tx *sql.Tx, id uuid.UUID, binding controlsession.Binding, ...) error
- func (s *Store) Append(ctx context.Context, id uuid.UUID, timestamp time.Time, data []byte) (Frame, error)
- func (s *Store) Finish(ctx context.Context, id uuid.UUID, status pb.DebugletOutputStatus, ...) (*pb.DebugletOutputEnd, error)
- func (s *Store) Frames(ctx context.Context, id uuid.UUID, after int64, limit int) ([]Frame, error)
- func (s *Store) Get(ctx context.Context, id uuid.UUID) (Run, error)
- func (s *Store) InterruptOpen(ctx context.Context) error
- func (s *Store) Pending(ctx context.Context, afterRunID string, limit int) ([]Run, error)
Constants ¶
This section is empty.
Variables ¶
var ( ErrOutputLimit = errors.New("run output limit reached") ErrSpoolLimit = errors.New("executor output storage limit reached") ErrFinalized = errors.New("output already finalized") ErrIdentity = errors.New("output identity differs from admission") ErrAcknowledgement = errors.New("output acknowledgement conflicts with retained output") )
Functions ¶
This section is empty.
Types ¶
type Limits ¶
type Limits struct {
ControlReserveBytes int64
RunBytes int64
RunFrames int64
NodeBytes int64
Runs int64
}
func DefaultLimits ¶
func DefaultLimits() Limits
type Run ¶
type Run struct {
ID uuid.UUID
Binding controlsession.Binding
Version uint32
LastSequence int64
AcknowledgedSequence int64
EmittedBytes int64
QueuedBytes int64
QueuedFrames int64
End *pb.DebugletOutputEnd
EndAcknowledged bool
Receipt *pb.DebugletOutputEnd
}
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) Abandon ¶
Abandon releases a finished run's spool when the dispatcher can no longer accept it: output bound to an ended session resumes only over an enrolled credential, and the dispatcher finalizes the rest as interrupted itself.
func (*Store) AcceptTruncation ¶
func (s *Store) AcceptTruncation(ctx context.Context, id uuid.UUID, end *pb.DebugletOutputEnd) error
AcceptTruncation records a dispatcher quota receipt separately from the producer's immutable end. The caller must first cancel and join the producer.
func (*Store) Acknowledge ¶
func (*Store) AdmitTx ¶
func (s *Store) AdmitTx(ctx context.Context, tx *sql.Tx, id uuid.UUID, binding controlsession.Binding, version uint32) error
AdmitTx reserves output identity and quota in the caller's admission transaction. The scheduler uses this so an accepted queued run cannot lack output metadata.
func (*Store) Append ¶
func (s *Store) Append(ctx context.Context, id uuid.UUID, timestamp time.Time, data []byte) (Frame, error)
Append returns only after the frame and its quota charge commit together.
func (*Store) InterruptOpen ¶
InterruptOpen records uncertainty about producers that died with the process. It grants no permission to replay their workloads.