archive

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const MaxConfigSize = 1024 * 1024

ConfigMap/etcd only supports data payload of up to 1MB, which limits the size of the config that can be can be uploaded (after compression). https://github.com/kubernetes/kubernetes/issues/19781

Variables

This section is empty.

Functions

func MaxSize

func MaxSize(size int64) func(*archive)

func NewArchive

func NewArchive(root string, opts ...func(*archive)) (*archive, error)

func Unpack

func Unpack(r io.Reader, dst string) error

Types

type MaxSizeError

type MaxSizeError int64

func (MaxSizeError) Error

func (m MaxSizeError) Error() string

type MaxWriter

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

MaxWriter implements Writer, wraps another Writer implementation, recording the number of bytes written, reporting an error when the total bytes written exceeds a given number. If max size is zero then no error will be reported.

func NewMaxWriter

func NewMaxWriter(w io.Writer, max int64) *MaxWriter

func (*MaxWriter) Write

func (m *MaxWriter) Write(p []byte) (int, error)

type Meta

type Meta struct {
	// The list of files contained in the slug.
	Files []string

	// Total size of the slug in bytes.
	Size int64

	// Total size of the slug in bytes after compression.
	CompressedSize int64
}

Meta provides detailed information about a slug.

Jump to

Keyboard shortcuts

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