store

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SandboxStore

type SandboxStore interface {
	// Save persists a sandbox with the configured TTL.
	Save(sandbox domain.Sandbox) error
	// Get retrieves a sandbox by namespace+sandboxID. Returns nil, nil if not found.
	Get(namespace, sandboxID string) (*domain.Sandbox, error)
	// List returns all sandboxes for the given namespace, sorted by claimedAt desc.
	List(namespace string) ([]domain.Sandbox, error)
	// Close closes the underlying store.
	Close() error
}

SandboxStore is the interface for persisting historical Sandbox records.

func NewSandboxStore

func NewSandboxStore(ttl time.Duration) (SandboxStore, error)

NewSandboxStore creates an in-memory buntdb SandboxStore with the given TTL. If ttl <= 0, defaultTTL (24h) is used.

Jump to

Keyboard shortcuts

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