transformer

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package transformer provides transformations for bundles

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageSubRule

type ImageSubRule struct {
	Find    string
	Replace string
}

ImageSubRule represents string substitutions to preform on images in bundles.

type ImageTransformer

type ImageTransformer struct {
	Bundle *bpb.ClusterBundle
}

ImageTransformer makes modifications to container and node images in Bundles.

func (*ImageTransformer) TransformImagesStringSub

func (t *ImageTransformer) TransformImagesStringSub(rules []*ImageSubRule) *bpb.ClusterBundle

TransformImagesStringSub transforms container and node images based on string substitution. A cloned bundle is always returned, even if no changes are made.

Rules are applied in order to images. If two rules apply, then they will be applied in order.

type InlineOptions

type InlineOptions struct {
	// TopLayerOnly inlines the components and node configuration files and stops
	// there.
	TopLayerOnly bool
}

InlineOptions are options to give to the inliner.

type Inliner

type Inliner struct {
	// Local reader reads from the local filesystem.
	Reader files.FilePBReader
}

Inliner inlines bundle files by reading them from the local or a remote filesystem.

func NewInliner

func NewInliner(cwd string) *Inliner

NewInliner creates a new inliner. If the bundle is stored on disk, the cwd should be the absolute path to the directory containing the bundle file on disk.

func (*Inliner) Inline

Inline converts dereferences File-references in a bundle and turns them into inline-references. Thus, the returned bundle is a copy with the file-references removed. This doesn't apply to binary images, which are left as-is.

Jump to

Keyboard shortcuts

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