groot

package module
v0.39.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 15 Imported by: 2

README

groot

Go Report Card Go Reference

A framework for building image plugins for Guardian in Go.

[!NOTE]

This repository should be imported as code.cloudfoundry.org/groot.

Contributing

See the Contributing.md for more information on how to contribute.

Working Group Charter

This repository is maintained by App Runtime Platform under Garden Containers area.

[!IMPORTANT]

Content in this file is managed by the CI task sync-readme and is generated by CI following a convention.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(driver Driver, argv []string, driverFlags []cli.Flag, version string)

Types

type DiskUsage

type DiskUsage struct {
	TotalBytesUsed     int64 `json:"total_bytes_used"`
	ExclusiveBytesUsed int64 `json:"exclusive_bytes_used"`
}

type DockerConfig

type DockerConfig struct {
	InsecureRegistries []string
	Username           string
	Password           string
}

type Driver

type Driver interface {
	ImageDriver
	VolumeDriver
}

Driver should implement the filesystem interaction

type Groot

type Groot struct {
	Driver      Driver
	Logger      lager.Logger
	ImagePuller ImagePuller
}

func (*Groot) Create

func (g *Groot) Create(handle string, diskLimit int64, excludeImageFromQuota bool) (runspec.Spec, error)

func (*Groot) Delete

func (g *Groot) Delete(handle string) error

func (*Groot) Pull

func (g *Groot) Pull() error

func (*Groot) Stats

func (g *Groot) Stats(handle string) (VolumeStats, error)

type ImageDriver

type ImageDriver interface {
	Bundle(logger lager.Logger, bundleID string, layerIDs []string, diskLimit int64) (runspec.Spec, error)
	Delete(logger lager.Logger, bundleID string) error
	Stats(logger lager.Logger, bundleID string) (VolumeStats, error)
	WriteMetadata(logger lager.Logger, bundleID string, imageMetadata ImageMetadata) error
}

type ImageMetadata

type ImageMetadata struct {
	Size int64 `json:"size"`
}

type ImagePuller

type ImagePuller interface {
	Pull(logger lager.Logger, spec imagepuller.ImageSpec) (imagepuller.Image, error)
}

ImagePuller should be able to download and store a remote (or local) image and return all its layer information so that it can be bundled together by the driver

type SilentError

type SilentError struct {
	Underlying error
}

SilentError silences errors. urfave/cli already prints certain errors, we don't want to print them twice

func (SilentError) Error

func (e SilentError) Error() string

type VolumeDriver

type VolumeDriver interface {
	Unpack(logger lager.Logger, layerID string, parentIDs []string, layerTar io.Reader) (int64, error)
}

type VolumeStats

type VolumeStats struct {
	DiskUsage DiskUsage `json:"disk_usage"`
}

Directories

Path Synopsis
fetcher
layerfetcher/layerfetcherfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.
imagepullerfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
integration

Jump to

Keyboard shortcuts

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