lru_driver

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: GPL-3.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 Driver

type Driver struct {
	driver.StorageDriver
	// contains filtered or unexported fields
}

Driver wraps a storage driver to track blob access for LRU eviction

func New

func New(base driver.StorageDriver, tracker *cache.LRUTracker, logger *logrus.Logger) *Driver

New creates a new LRU tracking storage driver

func (*Driver) GetContent

func (lru *Driver) GetContent(ctx context.Context, path string) ([]byte, error)

GetContent wraps the base driver's GetContent and tracks access

func (*Driver) Move

func (lru *Driver) Move(ctx context.Context, sourcePath string, destPath string) error

func (*Driver) Reader

func (lru *Driver) Reader(ctx context.Context, path string, offset int64) (io.ReadCloser, error)

Reader wraps the base driver's Reader and tracks access

func (*Driver) Writer

func (lru *Driver) Writer(ctx context.Context, path string, append bool) (driver.FileWriter, error)

Writer wraps the base driver's Writer to track writes

Jump to

Keyboard shortcuts

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