loop

package
v3.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsCapable

func IsCapable() bool

func WithLogger

func WithLogger(log *plog.Logger) funcopt.O

Types

type Info

type Info struct {
	LoopDevices []InfoEntry `json:"loopdevices"`
}

type InfoEntries

type InfoEntries []InfoEntry

func (InfoEntries) File

func (t InfoEntries) File(s string) *InfoEntry

func (InfoEntries) HasFile

func (t InfoEntries) HasFile(s string) bool

func (InfoEntries) Name

func (t InfoEntries) Name(s string) *InfoEntry

type InfoEntry

type InfoEntry struct {
	Name      string `json:"name"`      // "/dev/loop1"
	SizeLimit int64  `json:"sizelimit"` // 0
	Offset    int64  `json:"offset"`    // 0
	AutoClear bool   `json:"autoclear"` // true
	ReadOnly  bool   `json:"ro"`        // true
	BackFile  string `json:"back-file"` // "/var/lib/snapd/snaps/gnome-3-34-1804_66.snap"
	DirectIO  bool   `json:"dio"`       // false
	LogSec    int64  `json:"log-sec"`   // 512
}

type T

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

func New

func New(opts ...funcopt.O) *T

func (T) Add

func (t T) Add(ctx context.Context, filePath string) error

func (T) Data

func (t T) Data(ctx context.Context) (InfoEntries, error)

func (T) Delete

func (t T) Delete(ctx context.Context, devPath string) error

func (T) FileDelete

func (t T) FileDelete(ctx context.Context, filePath string) error

func (T) FileExists

func (t T) FileExists(ctx context.Context, filePath string) (bool, error)

func (T) FileGet

func (t T) FileGet(ctx context.Context, filePath string) (*InfoEntry, error)

func (T) Get

func (t T) Get(ctx context.Context, name string) (*InfoEntry, error)

Jump to

Keyboard shortcuts

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