helper

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindIP

func FindIP(input string) string

FindIP will return the IP address from a string. This is used to deal with responses from the Nomad API that contain the port such as 127.0.0.1:4646.

func HasObjectChanged added in v1.0.0

func HasObjectChanged(objectA, objectB interface{}) (changed bool, err error)

HasObjectChanged compares two objects to determine if they have changed.

func Max

func Max(values ...float64) float64

Max returns the largest float from a variable length list of floats.

func Min

func Min(values ...float64) float64

Min returns the smallest float from a variable length list of floats.

func ParseMetaConfig added in v1.0.0

func ParseMetaConfig(meta map[string]string, reqKeys []string) (missing []string)

ParseMetaConfig parses meta parameters from a Nomad agent or job configuration and validates required keys are present. If any required keys are found to be missing, these are returned. Otherwise, an empty slice is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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