bundlewriter

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BundleLoader

type BundleLoader interface {
	// Load will load a CA bundle given a trust-manager bundle name
	Load(ctx context.Context, namespace, name string) ([]byte, error)
}

BundleLoader is used to load the CA bundle

func NewBundleLoader

func NewBundleLoader(client client.Client) BundleLoader

NewBundleLoader creates a new BundleLoader with the given Kubernetes client

type BundleWriter

type BundleWriter struct {
	FileWriter   FileWriter
	BundleLoader BundleLoader
}

BundleWriter is used to write a bundle to a directory

func NewBundleWriter

func NewBundleWriter(loader BundleLoader, writer FileWriter) BundleWriter

func (BundleWriter) Sync

func (s BundleWriter) Sync(ctx context.Context, meta metadata.Metadata, target string) error

Sync will update the target directory with the latest bundle contents

type FileProjection

type FileProjection = volumeutil.FileProjection

FileProjection contains file data

type FileWriter

type FileWriter interface {
	Write(ctx context.Context, target string, payload map[string]FileProjection) error
}

FileWriter is used to write files to a given directory, this will wipe existing files and replace them with the given payload.

func NewAtomicFileWriter

func NewAtomicFileWriter() FileWriter

NewAtomicFileWriter returns a FileWriter that will replace the contents of a directory in an atomic manner.

Jump to

Keyboard shortcuts

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