cmd

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: MIT Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoUserPrompt = false

NoUserPrompt defines whether a user confirmation is required or should be omitted

Functions

func DeployViaHavenerConfig added in v0.18.0

func DeployViaHavenerConfig(hvnr havener.Havener, havenerConfig string) error

DeployViaHavenerConfig entry function for running a helm install

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func GetHumanReadableTime added in v1.0.0

func GetHumanReadableTime(date time.Time) string

GetHumanReadableTime returns the time as string in the format: hh:mm:ss from a date object.

func ListManifestFiles added in v1.1.0

func ListManifestFiles(release string) (map[string]*yamlv3.Node, error)

ListManifestFiles breaks up the manifest string of a Helm Release to return a map with the template filename as the key and the unmarshaled YAML data as the value.

func LogTask added in v1.0.0

func LogTask()

LogTask processes all log messages coming from havener package.

func NewHvnrRootCmd added in v1.4.1

func NewHvnrRootCmd() *cobra.Command

NewHvnrRootCmd returns the cobra base cmd

func PrintOutputMessage added in v1.0.0

func PrintOutputMessage(messages chan OutputMsg) error

PrintOutputMessage reads from the given output message channel and prints the respective messages without any buffering or sorting.

func PrintOutputMessageAsBlock added in v1.0.0

func PrintOutputMessageAsBlock(messages chan OutputMsg)

PrintOutputMessageAsBlock reads from the given output message channel and buffers the input until the channel is closed. Once closed, it prints the output messages sorted by the origin.

func PromptUser

func PromptUser(message string) bool

PromptUser prompts the user via STDIN to confirm the message with either 'yes', or 'no' -- yes being translated into true, everything else is false.

func PurgeHelmReleases added in v0.18.0

func PurgeHelmReleases(hvnr havener.Havener, helmReleaseNames ...string) error

PurgeHelmReleases delete releases via helm

func RenderNodeDetails added in v1.4.0

func RenderNodeDetails(topDetails *havener.TopDetails) string

RenderNodeDetails renders a box with usage details per node

func UpgradeViaHavenerConfig added in v0.18.0

func UpgradeViaHavenerConfig(hvnr havener.Havener, havenerConfig string) error

UpgradeViaHavenerConfig override an existing helm chart

func WaitCmdFunc added in v1.5.1

func WaitCmdFunc(hvnr *havener.Hvnr, settings WaitCmdSettings) error

WaitCmdFunc blocks until either the configured condition is reached or the timeout occurred.

Types

type OutputMsg added in v1.0.0

type OutputMsg struct {
	Timestamp time.Time
	Stream    string
	Origin    string
	Message   string
}

OutputMsg is a message with additional context like time, an origin (name), and stream (for example stdout).

type WaitCmdSettings added in v1.5.1

type WaitCmdSettings struct {
	Quiet        bool
	Namespace    string
	PodStartWith string
	Interval     time.Duration
	Timeout      time.Duration
}

WaitCmdSettings contains all possible settings of the wait command

Jump to

Keyboard shortcuts

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