etcd

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2015 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ImagePath is the path to deployment image in etcd
	ImagePath string = "/images"
	// ImageRepositoriesPath is the path to imageRepository resources in etcd
	ImageRepositoriesPath string = "/imageRepositories"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultRegistry

type DefaultRegistry interface {
	DefaultRegistry() (string, bool)
}

DefaultRegistry returns the default Docker registry (host or host:port), or false if it is not available.

type DefaultRegistryFunc

type DefaultRegistryFunc func() (string, bool)

DefaultRegistryFunc implements DefaultRegistry for a simple function.

func (DefaultRegistryFunc) DefaultRegistry

func (fn DefaultRegistryFunc) DefaultRegistry() (string, bool)

DefaultRegistry implements the DefaultRegistry interface for a function.

type Etcd

type Etcd struct {
	tools.EtcdHelper
	// contains filtered or unexported fields
}

Etcd implements ImageRegistry and ImageRepositoryRegistry backed by etcd.

func New

func New(helper tools.EtcdHelper, defaultRegistry DefaultRegistry) *Etcd

New returns a new etcd registry. Default registry is the value that will be applied to the Status.DockerImageRepository field if the repository does not have a specified DockerImageRepository.

func (*Etcd) CreateImage

func (r *Etcd) CreateImage(ctx kapi.Context, image *api.Image) error

CreateImage creates a new image

func (*Etcd) CreateImageRepository

func (r *Etcd) CreateImageRepository(ctx kapi.Context, repo *api.ImageRepository) error

CreateImageRepository registers the given ImageRepository.

func (*Etcd) DeleteImage

func (r *Etcd) DeleteImage(ctx kapi.Context, id string) error

DeleteImage deletes an existing image

func (*Etcd) DeleteImageRepository

func (r *Etcd) DeleteImageRepository(ctx kapi.Context, id string) error

DeleteImageRepository deletes an ImageRepository by id.

func (*Etcd) GetImage

func (r *Etcd) GetImage(ctx kapi.Context, id string) (*api.Image, error)

GetImage retrieves a specific image

func (*Etcd) GetImageRepository

func (r *Etcd) GetImageRepository(ctx kapi.Context, id string) (*api.ImageRepository, error)

GetImageRepository retrieves an ImageRepository by id.

func (*Etcd) ListImageRepositories

func (r *Etcd) ListImageRepositories(ctx kapi.Context, selector labels.Selector) (*api.ImageRepositoryList, error)

ListImageRepositories retrieves a list of ImageRepositories that match selector.

func (*Etcd) ListImages

func (r *Etcd) ListImages(ctx kapi.Context, selector labels.Selector) (*api.ImageList, error)

ListImages retrieves a list of images that match selector.

func (*Etcd) UpdateImage

func (r *Etcd) UpdateImage(ctx kapi.Context, image *api.Image) error

UpdateImage updates an existing image

func (*Etcd) UpdateImageRepository

func (r *Etcd) UpdateImageRepository(ctx kapi.Context, repo *api.ImageRepository) error

UpdateImageRepository replaces an existing ImageRepository in the registry with the given ImageRepository.

func (*Etcd) WatchImageRepositories

func (r *Etcd) WatchImageRepositories(ctx kapi.Context, label, field labels.Selector, resourceVersion string) (watch.Interface, error)

WatchImageRepositories begins watching for new, changed, or deleted ImageRepositories.

func (*Etcd) WatchImages

func (r *Etcd) WatchImages(ctx kapi.Context, label, field labels.Selector, resourceVersion string) (watch.Interface, error)

WatchImages begins watching for new or deleted Images.

Jump to

Keyboard shortcuts

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