Help us shape the future of Go! Take the 2026 Go Developer Survey

cache

package
v0.40.5 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const EnvVolumeKey = "PACK_VOLUME_KEY"

Variables

View Source
var RunningInContainer = func() bool {
	return proc.GetContainerRuntime(0, 0) != proc.RuntimeNotFound
}

Functions

This section is empty.

Types

type BindCache

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

func NewBindCache

func NewBindCache(cacheType CacheInfo, dockerClient DockerClient) *BindCache

func (*BindCache) Clear

func (c *BindCache) Clear(ctx context.Context) error

func (*BindCache) Name

func (c *BindCache) Name() string

func (*BindCache) Type

func (c *BindCache) Type() Type

type CacheInfo

type CacheInfo struct {
	Format Format
	Source string
}

func (*CacheInfo) SourceName

func (c *CacheInfo) SourceName() string

type CacheOpts

type CacheOpts struct {
	Build  CacheInfo
	Launch CacheInfo
	Kaniko CacheInfo
}

func (*CacheOpts) Set

func (c *CacheOpts) Set(value string) error

func (*CacheOpts) String

func (c *CacheOpts) String() string

func (*CacheOpts) Type

func (c *CacheOpts) Type() string

type DockerClient

type DockerClient interface {
	ImageRemove(ctx context.Context, image string, options dockerClient.ImageRemoveOptions) (dockerClient.ImageRemoveResult, error)
	VolumeRemove(ctx context.Context, volumeID string, options dockerClient.VolumeRemoveOptions) (dockerClient.VolumeRemoveResult, error)
}

type Format

type Format int
const (
	CacheVolume Format = iota
	CacheImage
	CacheBind
)

func (Format) String

func (f Format) String() string

type ImageCache

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

func NewImageCache

func NewImageCache(imageRef name.Reference, dockerClient DockerClient) *ImageCache

func (*ImageCache) Clear

func (c *ImageCache) Clear(ctx context.Context) error

func (*ImageCache) Name

func (c *ImageCache) Name() string

func (*ImageCache) Type

func (c *ImageCache) Type() Type

type Type

type Type int
const (
	Image Type = iota
	Volume
	Bind
)

type VolumeCache

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

func NewVolumeCache

func NewVolumeCache(imageRef name.Reference, cacheType CacheInfo, suffix string, dockerClient DockerClient, logger logging.Logger) (*VolumeCache, error)

func (*VolumeCache) Clear

func (c *VolumeCache) Clear(ctx context.Context) error

func (*VolumeCache) Name

func (c *VolumeCache) Name() string

func (*VolumeCache) Type

func (c *VolumeCache) Type() Type

Jump to

Keyboard shortcuts

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