Documentation
¶
Overview ¶
Package utils -- Utility functions to be used throughout cmd. Kind of decided that this was a pretty decent way of doing shared logic for
cmd.
Basically the same as for pkg, so nothing too special there, but since cmd
has a bit of nesting, it brings up some more questions.
It seems like golang itself does a pattern like this for `base` cmd units,
so this is probably not too shabby.
Index ¶
- func GetAnyMaster() (*hope.Node, error)
- func GetAvailableMasters() (*[]hope.Node, error)
- func GetHypervisor(name string) (*hope.Node, error)
- func GetHypervisors() (*[]hope.Node, error)
- func GetIdentifiableResources(names *[]string, tags *[]string) (*[]hope.Resource, error)
- func GetJob(jobName string) (*hope.Job, error)
- func GetJobs() (*[]hope.Job, error)
- func GetLoadBalancer() (*hope.Node, error)
- func GetNode(name string) (*hope.Node, error)
- func GetResources() (*[]hope.Resource, error)
- func GetVMs() (*hope.VMs, error)
- func HasNode(name string) bool
- func KubectlFromAnyMaster() (*kubeutil.Kubectl, error)
- func ReplaceParametersInDirectoryCopy(dir string, parameters []string) (string, error)
- func ReplaceParametersInFile(path string, parameters []string) (string, error)
- func ReplaceParametersInString(str string, parameters []string) (string, error)
- func ReplaceParametersWithSubstitutor(t *hope.TextSubstitutor, parameters []string) (string, error)
- func VMSpec(vmName string) (*hope.VMImageSpec, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAnyMaster ¶
func GetAvailableMasters ¶ added in v0.17.2
GetAvailableMasters -- Returns the list of master nodes that can be reached
in one way or another.
Doesn't confirm if the masters are configured, or are in the load balanced
set of masters; only that the node exists on its defined hypervisor.
func GetHypervisors ¶ added in v0.15.0
func GetLoadBalancer ¶ added in v0.17.0
func GetResources ¶
func HasNode ¶ added in v0.15.3
HasNode -- Check whether a node has been defined in the hope file, even if
the node doesn't exist on its hypervisor yet.
func KubectlFromAnyMaster ¶ added in v0.15.2
func ReplaceParametersInDirectoryCopy ¶ added in v0.15.0
ReplaceParametersInDirectoryCopy - Copy the provided directory, and replace
parameters in the files.
Returns the temp path to the copied directory, and the caller must clean up
that directory itself, unless an error occurs.
func ReplaceParametersInFile ¶
func ReplaceParametersWithSubstitutor ¶
func ReplaceParametersWithSubstitutor(t *hope.TextSubstitutor, parameters []string) (string, error)
Types ¶
This section is empty.