lifecycle

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package lifecycle manages background maintenance tasks: session reaping, terminal execution cleanup, timeout enforcement, and startup recovery.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deps

type Deps struct {
	Events           store.EventStore
	Sessions         store.SessionStore
	Checkpoints      store.CheckpointStore
	Signals          store.SignalStore
	AgentHub         store.AgentHub
	Locker           store.Locker
	Projector        *projector.Projector
	Emitter          EventEmitter
	Logger           *slog.Logger
	ExecutionTimeout time.Duration
}

type EventEmitter

type EventEmitter interface {
	EmitEvent(
		ctx context.Context,
		executionID string,
		stepID string,
		eventType domain.EventType,
		payload any,
		causationID uuid.UUID,
		correlationID uuid.UUID,
	) (domain.Event, error)
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(d Deps) *Manager

func (*Manager) RecoverActiveExecutions

func (m *Manager) RecoverActiveExecutions(ctx context.Context)

func (*Manager) StartCleanup

func (m *Manager) StartCleanup(ctx context.Context, retentionPeriod, interval time.Duration)

func (*Manager) StartSessionReaper

func (m *Manager) StartSessionReaper(ctx context.Context)

func (*Manager) StartTimeoutWatcher

func (m *Manager) StartTimeoutWatcher(ctx context.Context)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL