client

package
v0.0.0-...-32432d4 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerHub

type DockerHub struct {
	Client  *http.Client
	RepoURL string
}

DockerHub manages Docker hub images

func NewDockerHubClient

func NewDockerHubClient() *DockerHub

NewDockerHubClient creates a default docker hub client

func (*DockerHub) GetImageData

func (c *DockerHub) GetImageData(image string) (*ImageData, error)

GetImageData return image tags

type ImageData

type ImageData struct {
	Tags []Tag
}

ImageData has image info

func (*ImageData) GetLatestTag

func (i *ImageData) GetLatestTag() string

GetLatestTag returns the latest tag if a tag "latest" is found it returns "latest"

type Kubernetes

type Kubernetes struct {
	// contains filtered or unexported fields
}

Kubernetes is a simplified client

func NewKubernetesClient

func NewKubernetesClient(config string, namespace string) (*Kubernetes, error)

NewKubernetesClient creates a new kubernetes client using the config file

func (*Kubernetes) CreateDeployment

func (k *Kubernetes) CreateDeployment(d *extensions.Deployment) (*extensions.Deployment, error)

CreateDeployment creates a deployment

func (*Kubernetes) Deployments

func (k *Kubernetes) Deployments() ([]extensions.Deployment, error)

Deployments return kubernetes deployments

func (*Kubernetes) Namespaces

func (k *Kubernetes) Namespaces() ([]api.Namespace, error)

Namespaces return all kubernetes namespaces

func (*Kubernetes) Pods

func (k *Kubernetes) Pods(namespace string) ([]api.Pod, error)

Pods return pods

func (*Kubernetes) ReplicationControllers

func (k *Kubernetes) ReplicationControllers(namespace string) ([]api.ReplicationController, error)

ReplicationControllers return replication controllers

type Tag

type Tag struct {
	Layer   string     `json:"layer"`
	Name    string     `json:"name"`
	Version TagVersion `json:"-"`
}

Tag is a docker hub image tag

type TagVersion

type TagVersion struct {
	Mayor    int
	Minor    int
	Build    int
	Revision int
}

TagVersion contains tag parsing

Jump to

Keyboard shortcuts

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