cleanup

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidPlan = errors.New("cleanup plan is invalid")

Functions

This section is empty.

Types

type ExecutionRecord

type ExecutionRecord struct {
	PluginInstanceID string    `json:"plugin_instance_id"`
	DeleteData       bool      `json:"delete_data"`
	Phase            Phase     `json:"phase"`
	ExecutedAt       time.Time `json:"executed_at"`
}

type Inspector

type Inspector interface {
	ListExecutions(ctx context.Context, pluginInstanceID string) ([]ExecutionRecord, error)
}

type MemoryOrchestrator

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

func NewMemoryOrchestrator

func NewMemoryOrchestrator() *MemoryOrchestrator

func (*MemoryOrchestrator) Execute

func (o *MemoryOrchestrator) Execute(_ context.Context, plan Plan) error

func (*MemoryOrchestrator) ForceCleanup

func (o *MemoryOrchestrator) ForceCleanup(ctx context.Context, pluginInstanceID string) error

func (*MemoryOrchestrator) ListExecutions

func (o *MemoryOrchestrator) ListExecutions(_ context.Context, pluginInstanceID string) ([]ExecutionRecord, error)

func (*MemoryOrchestrator) PlanUninstall

func (o *MemoryOrchestrator) PlanUninstall(_ context.Context, pluginInstanceID string, deleteData bool) (Plan, error)

type Orchestrator

type Orchestrator interface {
	PlanUninstall(ctx context.Context, pluginInstanceID string, deleteData bool) (Plan, error)
	Execute(ctx context.Context, plan Plan) error
	ForceCleanup(ctx context.Context, pluginInstanceID string) error
}

type Phase

type Phase string
const (
	PhaseTombstone     Phase = "tombstone"
	PhaseRevoke        Phase = "revoke"
	PhaseDeleteData    Phase = "delete_data"
	PhaseDeletePackage Phase = "delete_package"
	PhaseComplete      Phase = "complete"
)

type Plan

type Plan struct {
	PluginInstanceID string  `json:"plugin_instance_id"`
	DeleteData       bool    `json:"delete_data"`
	Phases           []Phase `json:"phases"`
}

type SQLiteOrchestrator

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

func NewSQLiteOrchestrator

func NewSQLiteOrchestrator(ctx context.Context, path string) (*SQLiteOrchestrator, error)

func (*SQLiteOrchestrator) Close

func (o *SQLiteOrchestrator) Close() error

func (*SQLiteOrchestrator) Execute

func (o *SQLiteOrchestrator) Execute(ctx context.Context, plan Plan) error

func (*SQLiteOrchestrator) ForceCleanup

func (o *SQLiteOrchestrator) ForceCleanup(ctx context.Context, pluginInstanceID string) error

func (*SQLiteOrchestrator) ListExecutions

func (o *SQLiteOrchestrator) ListExecutions(ctx context.Context, pluginInstanceID string) ([]ExecutionRecord, error)

func (*SQLiteOrchestrator) PlanUninstall

func (o *SQLiteOrchestrator) PlanUninstall(_ context.Context, pluginInstanceID string, deleteData bool) (Plan, error)

Jump to

Keyboard shortcuts

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