layers

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2020 License: Apache-2.0 Imports: 13 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory struct {
	ArtifactsDir string
	UID, GID     int
	Logger       Logger
	// contains filtered or unexported fields
}

func (*Factory) DirLayer

func (f *Factory) DirLayer(id string, dir string) (layer Layer, err error)

DirLayer creates a layer form the given directory

func (*Factory) SliceLayers

func (f *Factory) SliceLayers(dir string, slices []Slice) ([]Layer, error)

SliceLayers divides dir into layers using slices using the following process: * Given n slices SliceLayers will return n+1 layers * The first n layers will contain files matched by the any Path in the nth Slice * The final layer will contain any files in dir that were not included in a previous layer Some layers may be empty

type Layer

type Layer struct {
	ID      string
	TarPath string
	Digest  string
}

type Logger

type Logger interface {
	Debug(msg string)
	Debugf(fmt string, v ...interface{})

	Info(msg string)
	Infof(fmt string, v ...interface{})

	Warn(msg string)
	Warnf(fmt string, v ...interface{})

	Error(msg string)
	Errorf(fmt string, v ...interface{})
}

type Slice

type Slice struct {
	Paths []string `toml:"paths"`
}

Jump to

Keyboard shortcuts

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