bundle

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrWrongBundle = errors.New("tar: invalid bundle provided")
View Source
var ErrWrongBundlePath = errors.New("wrong bundle directory")

Functions

func BundleBinDir

func BundleBinDir() string

func BundlePath

func BundlePath() string

by default homecli is located in /opt/wekahome/{release}/bin and bundle in /opt/wekahome/{release}/

func Chart

func Chart() (string, error)

func ChartCrd added in v0.4.9

func ChartCrd() (string, error)

func GetPath

func GetPath(path string) string

func IsBundled

func IsBundled() bool

func ReadFile

func ReadFile(path string) (io.Reader, error)

func ReadFileBytes

func ReadFileBytes(path string) ([]byte, error)

func SetBundlePath

func SetBundlePath(path string) error

SetBundlePath allows to override default bundle directory

Types

type BundleImage

type BundleImage struct {
	Name     string
	Location string
}

func Images

func Images() ([]BundleImage, error)

Images returns list of images in bundle

type Manifest

type Manifest struct {
	WekaHome string `json:"wekaHome"`
	K3S      string `json:"k3s"`

	// map[filename]imageName
	DockerImages map[string]string `json:"dockerImages"`
	// map[filename]digest
	FilesDigest map[string]string `json:"filesDigest"`
}

func GetManifest

func GetManifest() (Manifest, error)

type Tar

type Tar string

func (Tar) GetFiles

func (t Tar) GetFiles(ctx context.Context, calls ...TarCallback) (err error)

GetFiles reads files from tar archive and pass them to callback fileNames can be direct match or glob like file_*.go, callback is applied to any file matched

type TarCallback

type TarCallback struct {
	FileName string
	Callback func(context.Context, fs.FileInfo, io.Reader) error
}

Jump to

Keyboard shortcuts

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