imagemanager

package
v0.1.24 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2018 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StatusINITIALIZED captures enum value "INITIALIZED"
	StatusINITIALIZED entitystore.Status = "INITIALIZED"
	// StatusCREATING captures enum value "CREATING"
	StatusCREATING entitystore.Status = "CREATING"
	// StatusUPDATING capture enum value "UPDATING"
	StatusUPDATING entitystore.Status = "UPDATING"
	// StatusREADY captures enum value "READY"
	StatusREADY entitystore.Status = "READY"
	// StatusERROR captures enum value "ERROR"
	StatusERROR entitystore.Status = "ERROR"
	// StatusDELETED captures enum value "DELETED"
	StatusDELETED entitystore.Status = "DELETED"
)

Variables

This section is empty.

Functions

func DockerImageStatus added in v0.1.13

func DockerImageStatus(ctx context.Context, client docker.ImageAPIClient, images []DockerImage) ([]entitystore.Entity, error)

DockerImageStatus gathers the status of multiple docker images

func FilterLastPulledBefore added in v0.1.23

func FilterLastPulledBefore(duration time.Duration) entitystore.Filter

FilterLastPulledBefore creates a filter, which will filter images that were last pulled before a specified duration

func NewController added in v0.1.13

func NewController(config *ControllerConfig, store entitystore.EntityStore, baseImageBuilder *BaseImageBuilder, imageBuilder *ImageBuilder) controller.Controller

NewController creates a new image manager controller

Types

type BaseImage

type BaseImage struct {
	entitystore.BaseEntity
	DockerURL    string    `json:"dockerUrl"`
	Language     string    `json:"language"`
	LastPullTime time.Time `json:"lastPullTime,omitempty"`
}

BaseImage defines a base image type

type BaseImageBuilder

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

BaseImageBuilder manages base images, which are referenced docker images

func NewBaseImageBuilder

func NewBaseImageBuilder(es entitystore.EntityStore, pullPeriod time.Duration) (*BaseImageBuilder, error)

NewBaseImageBuilder is the constructor for the BaseImageBuilder

type ControllerConfig added in v0.1.13

type ControllerConfig struct {
	ResyncPeriod      time.Duration
	ZookeeperLocation string
}

ControllerConfig defines the image manager controller configuration

type DockerImage added in v0.1.13

type DockerImage interface {
	entitystore.Entity
	GetDockerURL() string
}

DockerImage defines the docker image interface

type Handlers

type Handlers struct {
	Store   entitystore.EntityStore
	Watcher controller.Watcher
	// contains filtered or unexported fields
}

Handlers encapsulates the image manager handlers

func NewHandlers

func NewHandlers(imageBuilder *ImageBuilder, baseImageBuilder *BaseImageBuilder, watcher controller.Watcher, store entitystore.EntityStore) *Handlers

NewHandlers is the constructor for the Handlers type

func (*Handlers) ConfigureHandlers

func (h *Handlers) ConfigureHandlers(api middleware.RoutableAPI)

ConfigureHandlers registers the image manager handlers to the API

type Image

type Image struct {
	entitystore.BaseEntity
	DockerURL           string              `json:"dockerUrl"`
	Language            string              `json:"language"`
	BaseImageName       string              `json:"baseImageName"`
	RuntimeDependencies RuntimeDependencies `json:"runtimeDependencies"`
	SystemDependencies  SystemDependencies  `json:"systemDependencies"`
	LastPullTime        time.Time           `json:"lastPullTime,omitempty"`
}

Image defines an image type

func (*Image) GetDockerURL added in v0.1.13

func (i *Image) GetDockerURL() string

GetDockerURL returns the docker URL for the image

type ImageBuilder

type ImageBuilder struct {
	PushImages bool
	// contains filtered or unexported fields
}

ImageBuilder manages building images

func NewImageBuilder

func NewImageBuilder(es entitystore.EntityStore, registryHost, registryAuth string, pullPeriod time.Duration) (*ImageBuilder, error)

NewImageBuilder is the constructor for the ImageBuilder

type RuntimeDependencies added in v0.1.13

type RuntimeDependencies struct {
	Manifest string `json:"manifest"`
}

RuntimeDependencies defines a runtime dependency type

type SystemDependencies added in v0.1.13

type SystemDependencies struct {
	Packages []SystemPackage `json:"packages"`
}

SystemDependencies defines a system dependency type

type SystemPackage added in v0.1.13

type SystemPackage struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

SystemPackage defines a system package type

Directories

Path Synopsis
gen
restapi
Package restapi Image Manager VMware Dispatch Image Manager Schemes: http https Host: localhost BasePath: /v1 Version: 1.0.0 Contact: <dispatch@vmware.com> Consumes: - application/json Produces: - application/json swagger:meta
Package restapi Image Manager VMware Dispatch Image Manager Schemes: http https Host: localhost BasePath: /v1 Version: 1.0.0 Contact: <dispatch@vmware.com> Consumes: - application/json Produces: - application/json swagger:meta

Jump to

Keyboard shortcuts

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