storagecapacity

package
v1.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnresolvedSizes = errors.New("capacity eviction requires every active storage location size")

Functions

This section is empty.

Types

type Options

type Options struct {
	DB        *ent.Client
	Storage   storage.Adapter
	Config    config.CacheConfig
	Lifecycle *storagelifecycle.Service
	Logger    *zerolog.Logger
}

type Result

type Result struct {
	Mode                string
	BudgetBytes         int64
	TargetBytes         int64
	UsageBeforeBytes    int64
	UsageAfterBytes     int64
	PendingCreditBytes  int64
	Candidates          int
	ClaimedLocations    int
	ClaimedBytes        int64
	PinnedLocations     int
	StaleLocations      int
	UnresolvedLocations int
	Constrained         bool
}

type Service

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

func NewService

func NewService(options Options) *Service

func (*Service) Enforce

func (s *Service) Enforce(ctx context.Context) (Result, error)

func (*Service) Run

func (s *Service) Run(ctx context.Context, ready <-chan struct{})

func (*Service) Trigger

func (s *Service) Trigger()

Jump to

Keyboard shortcuts

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