rkt

package
v1.17.0 Latest Latest
Warning

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

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

Documentation

Overview

Package rkt is expected to be used by other projects who want to integrate with rkt. See https://peter.bourgon.org/go-best-practices-2016/#repository-structure for the rationale of calling this package "rkt" located in the "lib" subdirectory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// Name of the app.
	Name string `json:"name"`
	// State of the app, can be created, running, exited, or unknown.
	State AppState `json:"state"`
	// Creation time of the container, nanoseconds since epoch.
	CreatedAt *int64 `json:"created_at,omitempty"`
	// Start time of the container, nanoseconds since epoch.
	StartedAt *int64 `json:"started_at,omitempty"`
	// Finish time of the container, nanoseconds since epoch.
	FinishedAt *int64 `json:"finished_at,omitempty"`
	// Exit code of the container.
	ExitCode *int32 `json:"exit_code,omitempty"`
	// Image ID of the container.
	ImageID string `json:"image_id"`
	// Mount points of the container.
	Mounts []*Mount `json:"mounts,omitempty"`
	// Annotations of the container.
	Annotations map[string]string `json:"annotations,omitempty"`
}

App defines the app object.

func AppsForPod

func AppsForPod(uuid, dataDir string, appName string) ([]*App, error)

AppsForPod returns the apps of the pod with the given uuid in the given data directory. If appName is non-empty, then only the app with the given name will be returned.

type AppState

type AppState string

AppState defines the state of the app.

const (
	AppStateUnknown AppState = "unknown"
	AppStateCreated AppState = "created"
	AppStateRunning AppState = "running"
	AppStateExited  AppState = "exited"
)

type Mount

type Mount struct {
	// Name of the mount.
	Name string `json:"name"`
	// Container path of the mount.
	ContainerPath string `json:"container_path"`
	// Host path of the mount.
	HostPath string `json:"host_path"`
	// Whether the mount is read-only.
	ReadOnly bool `json:"read_only"`
}

Mount defines the mount point.

type Pod

type Pod struct {
	// UUID of the pod.
	UUID string `json:"name"`
	// State of the pod, all valid values are defined in pkg/pod/pods.go.
	State string `json:"state"`
	// Networks are the information of the networks.
	Networks []netinfo.NetInfo `json:"networks,omitempty"`
	// AppNames are the names of the apps.
	AppNames []string `json:"app_names,omitempty"`
}

Pod defines the pod object.

Jump to

Keyboard shortcuts

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