watches

package
Version: v0.19.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const WatchesFile = "watches.yaml"

Variables

This section is empty.

Functions

func Append added in v0.18.0

func Append(r io.Reader, watch Watch) ([]byte, error)

Append reads watches.yaml data from the provided reader, verifies that the provided watch is valid and unique, and returns a buffer containing the new watch appended to the end of the existing watches.yaml data. If an error occurs, it will be returned.

func UpdateForResource added in v0.18.0

func UpdateForResource(path string, r *scaffold.Resource, chartName string) (err error)

UpdateForResource appends a new watch to the provided watches.yaml file based on the provided resource. The watch is validated and must be unique. If an error occurs, it is returned.

Types

type Watch

type Watch struct {
	schema.GroupVersionKind `json:",inline"`
	ChartDir                string            `json:"chart"`
	WatchDependentResources *bool             `json:"watchDependentResources,omitempty"`
	OverrideValues          map[string]string `json:"overrideValues,omitempty"`
}

Watch defines options for configuring a watch for a Helm-based custom resource.

func Load

func Load(path string) ([]Watch, error)

Load loads a slice of Watches from the watch file at `path`. For each entry in the watches file, it verifies the configuration. If an error is encountered loading the file or verifying the configuration, it will be returned.

func LoadReader added in v0.18.0

func LoadReader(reader io.Reader) ([]Watch, error)

LoadReader loads a slice of Watches from the provided reader. For each entry in the watches file, it verifies the configuration. If an error is encountered reading or verifying the configuration, it will be returned.

func (*Watch) UnmarshalYAML deprecated added in v0.18.0

func (w *Watch) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML unmarshals an individual watch from the Helm watches.yaml file into a Watch struct.

Deprecated: This function is no longer used internally to unmarshal watches.yaml data. To ensure the correct defaults are applied when loading watches.yaml, use Load() or LoadReader() instead of this function and/or yaml.Unmarshal().

Source Files

Jump to

Keyboard shortcuts

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