semanticgc

package
v0.8.19 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	Path       string    `json:"path"`
	Kind       string    `json:"kind"`
	ProfileID  string    `json:"profile_id,omitempty"`
	ID         string    `json:"id,omitempty"`
	Bytes      int64     `json:"bytes"`
	ModifiedAt time.Time `json:"modified_at"`
	Orphan     bool      `json:"orphan"`
}

type Catalog

type Catalog interface {
	PlanRetrievalSemanticGC(context.Context, store.RetrievalSemanticGCOptions) (store.RetrievalSemanticGCPlan, error)
	PruneRetrievalSemanticCatalog(context.Context, store.RetrievalSemanticGCOptions) (store.RetrievalSemanticGCPlan, error)
	VacuumRetrievalDatabase(context.Context) error
}

type Options

type Options struct {
	Now             time.Time
	GracePeriod     time.Duration
	RetainPublished int
	LockTimeout     time.Duration
	Apply           bool
	Vacuum          bool
}

type Result

type Result struct {
	Applied                bool                          `json:"applied"`
	Vacuumed               bool                          `json:"vacuumed"`
	Catalog                store.RetrievalSemanticGCPlan `json:"catalog"`
	FilesystemArtifacts    []Artifact                    `json:"filesystem_artifacts"`
	PrunableBytes          int64                         `json:"prunable_bytes"`
	DeletedFilesystemDirs  int                           `json:"deleted_filesystem_dirs"`
	DeletedFilesystemBytes int64                         `json:"deleted_filesystem_bytes"`
}

func Run

func Run(ctx context.Context, catalog Catalog, cacheDir, databaseID string, opts Options) (result Result, returnErr error)

Jump to

Keyboard shortcuts

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