utils

package
v0.0.0-...-6e18aa0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2015 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoRequest

func DoRequest(client *http.Client, u *url.URL, method string, path string, body []byte, headers map[string]string) (int, []byte, error)

func DoStreamRequest

func DoStreamRequest(client *http.Client, u *url.URL, method string, path string, in io.Reader, headers map[string]string) (int, io.ReadCloser, error)

func DockerPid

func DockerPid(containername string) int

func EtcdClientNew

func EtcdClientNew(endpoints []string) client.KeysAPI

func GenerateRandomName

func GenerateRandomName(prefix string, size int) (string, error)

GenerateRandomName returns a new name joined with a prefix. This size specified is used to truncate the randomly generated value

func GetDockerNameFromID

func GetDockerNameFromID(ID string) string

func GetEnv

func GetEnv(data []byte) map[string]string

func GetIfaceAddr

func GetIfaceAddr(name string) (*net.IPNet, error)

Return the IPv4 address of a network interface

func GetNetworkMode

func GetNetworkMode(data []byte) string

func MakeMac

func MakeMac(ip net.IP) string

Generate a mac addr

func NewHTTPClient

func NewHTTPClient(u *url.URL, tlsConfig *tls.Config) *http.Client

func ValidateHostIface

func ValidateHostIface(ifaceStr string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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