utils

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2016 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddContainer

func AddContainer(state string, container types.Container, containers []model.PingResource, dockerClient *engineCli.Client) []model.PingResource

func AddLabel

func AddLabel(config *container.Config, key string, value string)

func AddLinkEnv

func AddLinkEnv(name string, link model.Link, result map[string]string, inIP string)

func AddToEnv

func AddToEnv(config *container.Config, result map[string]string, args ...string)

func AgentIDFilter

func AgentIDFilter(id string, container types.Container) bool

func ConvertPortToString

func ConvertPortToString(port int) string

func CopyLinkEnv

func CopyLinkEnv(name string, link model.Link, result map[string]string)

func DownloadFile

func DownloadFile(url string, dest string, reporthook interface{}, checksum string) (string, error)

func FindFirst

func FindFirst(containers []types.Container, f func(types.Container) bool) (types.Container, bool)

func GetContainer

func GetContainer(client *engineCli.Client, instance model.Instance, byAgent bool) (types.Container, error)

func GetExitCode

func GetExitCode(err error) int

func GetFieldsIfExist

func GetFieldsIfExist(m map[string]interface{}, fields ...string) (interface{}, bool)

func GetInstanceAndHost

func GetInstanceAndHost(event *revents.Event) (model.Instance, model.Host, error)

func GetProgress

func GetProgress(request *revents.Event, cli *client.RancherClient) *progress.Progress

func GetUUID

func GetUUID(container types.Container) string

func HasKey

func HasKey(m interface{}, key string) bool

func HasLabel

func HasLabel(instance model.Instance) bool

func IDFilter

func IDFilter(id string, container types.Container) bool

func ImageStoragePoolMapReply added in v0.2.2

func ImageStoragePoolMapReply() (map[string]interface{}, error)

func InstanceHostMapReply added in v0.2.2

func InstanceHostMapReply(event *revents.Event, client *client.Client, cache *cache.Cache) (map[string]interface{}, error)

func InstancePullReply added in v0.2.2

func InstancePullReply(event *revents.Event, client *client.Client) (map[string]interface{}, error)

func InterfaceToArray

func InterfaceToArray(v interface{}) []interface{}

func InterfaceToBool

func InterfaceToBool(v interface{}) bool

func InterfaceToMap

func InterfaceToMap(v interface{}) map[string]interface{}

func InterfaceToString

func InterfaceToString(v interface{}) string

func IsContainerNotFoundError

func IsContainerNotFoundError(e error) bool

func IsImageNoOp

func IsImageNoOp(image model.Image) bool

func IsNoOp

func IsNoOp(data model.ProcessData) bool

func IsNonrancherContainer

func IsNonrancherContainer(instance model.Instance) bool

func IsNoopEvent added in v0.2.4

func IsNoopEvent(event *revents.Event) bool

func NameFilter

func NameFilter(name string, container types.Container) bool

func ParseRepoTag

func ParseRepoTag(name string) string

func ReadBuffer

func ReadBuffer(reader io.ReadCloser) string

func RemoveContainer

func RemoveContainer(client *engineCli.Client, containerID string) error

func SearchInList

func SearchInList(slice []string, target string) bool

func SemverTrunk

func SemverTrunk(version string, vals int) string

func TempFile

func TempFile(destination string) string

func TempFileInWorkDir

func TempFileInWorkDir(destination string) string

func VolumeStoragePoolMapReply added in v0.2.2

func VolumeStoragePoolMapReply() (map[string]interface{}, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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