utils

package
v0.7.15 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2017 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBridgeInfo added in v0.7.11

func GetBridgeInfo(network metadata.Network, host metadata.Host) (bridge string, bridgeSubnet string)

GetBridgeInfo is used to figure out the bridge information from the CNI config of the network specified

func GetLocalNetworksAndRouters added in v0.7.11

func GetLocalNetworksAndRouters(networks []metadata.Network, host metadata.Host, services []metadata.Service) ([]metadata.Network, map[string]metadata.Container)

GetLocalNetworksAndRouters fetches networks and network containers related to that networks running in the current environment

func GetLocalNetworksAndRoutersFromMetadata added in v0.7.11

func GetLocalNetworksAndRoutersFromMetadata(mc metadata.Client) ([]metadata.Network, map[string]metadata.Container, error)

GetLocalNetworksAndRoutersFromMetadata is used to fetch networks local to the current environment

func IsContainerConsideredRunning added in v0.7.12

func IsContainerConsideredRunning(aContainer metadata.Container) bool

IsContainerConsideredRunning function is used to test if the container is in any of the states that are considered running.

func Run added in v0.7.10

func Run(cmdStr string) error

Run with given command with stdout and stderr connected

func RunCombined added in v0.7.10

func RunCombined(cmdStr string) ([]byte, error)

RunCombined is used to run the given command with combined stdout and stderr outputs

func RunNoStderr added in v0.7.10

func RunNoStderr(cmdStr string) error

RunNoStderr runs the given command with no output to stderr

func RunNoStdoutNoStderr added in v0.7.10

func RunNoStdoutNoStderr(cmdStr string) error

RunNoStdoutNoStderr runs the given command with no output to stdout and stderr

func RunOutput added in v0.7.10

func RunOutput(cmdStr string) ([]byte, error)

RunOutput is used to run the given command and return output from stdout

func UpdateCNIConfigByKeywords

func UpdateCNIConfigByKeywords(config interface{}, host metadata.Host) interface{}

UpdateCNIConfigByKeywords takes in the given CNI config, replaces the rancher specific keywords with the appropriate values.

Types

This section is empty.

Jump to

Keyboard shortcuts

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