rkt

package
v0.0.0-...-9050134 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fetch

func Fetch(image string) (string, error)

Fetch will fetch a rkt image and return the image hash

func GetAppName

func GetAppName(projectName string, containerName string) (string, error)

GetAppName will generate the app name for this container/project combination

Types

type ImageApp

type ImageApp struct {
	Ports []ImageAppPort `json:"ports"`
}

ImageApp holds information from the image-manifest about an app. Note: we only grab what we need at this point (or what is easy)

type ImageAppPort

type ImageAppPort struct {
	Name     string `json:"name"`
	Protocol string `json:"protocol"`
	Port     int    `json:"port"`
	// contains filtered or unexported fields
}

ImageAppPort is the representation of port information found in rkt image manifests

type ImageManifest

type ImageManifest struct {
	ACKind    string   `json:"acKind"`
	ACVersion string   `json:"acVersion"`
	Name      string   `json:"name"`
	App       ImageApp `json:"app"`
}

ImageManifest holds information about an image. Note: we only grab what we need at this point (or what is easy)

func GetImageManifest

func GetImageManifest(image string) (*ImageManifest, error)

GetImageManifest will get the manifest for an image that has been fetched it returns the manifest mapped to a generic interface

type Network

type Network struct {
	NetName    string `json:"netName"`
	NetConf    string `json:"netConf"`
	PluginPath string `json:"pluginPath"`
	IfName     string `json:"ifName"`
	IP         string `json:"ip"`
	Args       string `json:"args"`
	Mask       string `json:"mask"`
}

Network holds network information for a running container

type Pod

type Pod struct {
	Name      string    `json:"name"`
	State     string    `json:"state"`
	Networks  []Network `json:"networks"`
	AppNames  []string  `json:"app_names"`
	StartedAt time.Time `json:"started_at"`
}

Pod holds information about containers

func (*Pod) UnmarshalJSON

func (pod *Pod) UnmarshalJSON(b []byte) error

UnmarshalJSON

type Pods

type Pods struct {
	Pods map[string]Pod
}

Pods stores a number of pods indexed by their appName

func GetAllPods

func GetAllPods(projectName string) (Pods, error)

GetAllPods will return a list of all pods in rkt

func GetRunningPods

func GetRunningPods(projectName string) (Pods, error)

GetRunningPods will get a list of running pods that are relevant to the provided project, and will return their information indexed by the appName

Jump to

Keyboard shortcuts

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