etcd

package
v0.0.0-...-ac8ee45 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2014 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package etcd provides etcd backend implementation for storing PodRegistry, ControllerRegistry and ServiceRegistry api objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicManifestFactory

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

func (*BasicManifestFactory) MakeManifest

func (b *BasicManifestFactory) MakeManifest(machine string, pod api.Pod) (api.ContainerManifest, error)

type ManifestFactory

type ManifestFactory interface {
	// Make a container object for a given pod, given the machine that the pod is running on.
	MakeManifest(machine string, pod api.Pod) (api.ContainerManifest, error)
}

type Registry

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

Registry implements PodRegistry, ControllerRegistry and ServiceRegistry with backed by etcd.

func NewRegistry

func NewRegistry(client tools.EtcdClient) *Registry

NewRegistry creates an etcd registry.

func (*Registry) ApplyBinding

func (r *Registry) ApplyBinding(binding *api.Binding) error

ApplyBinding implements binding's registry

func (*Registry) CreateController

func (r *Registry) CreateController(controller *api.ReplicationController) error

CreateController creates a new ReplicationController.

func (*Registry) CreatePod

func (r *Registry) CreatePod(pod *api.Pod) error

CreatePod creates a pod based on a specification.

func (*Registry) CreateService

func (r *Registry) CreateService(svc *api.Service) error

CreateService creates a new Service.

func (*Registry) DeleteController

func (r *Registry) DeleteController(controllerID string) error

DeleteController deletes a ReplicationController specified by its ID.

func (*Registry) DeletePod

func (r *Registry) DeletePod(podID string) error

DeletePod deletes an existing pod specified by its ID.

func (*Registry) DeleteService

func (r *Registry) DeleteService(name string) error

DeleteService deletes a Service specified by its name.

func (*Registry) GetController

func (r *Registry) GetController(controllerID string) (*api.ReplicationController, error)

GetController gets a specific ReplicationController specified by its ID.

func (*Registry) GetEndpoints

func (r *Registry) GetEndpoints(name string) (*api.Endpoints, error)

GetEndpoints obtains the endpoints for the service identified by 'name'.

func (*Registry) GetPod

func (r *Registry) GetPod(podID string) (*api.Pod, error)

GetPod gets a specific pod specified by its ID.

func (*Registry) GetService

func (r *Registry) GetService(name string) (*api.Service, error)

GetService obtains a Service specified by its name.

func (*Registry) ListControllers

func (r *Registry) ListControllers() (*api.ReplicationControllerList, error)

ListControllers obtains a list of ReplicationControllers.

func (*Registry) ListEndpoints

func (r *Registry) ListEndpoints() (*api.EndpointsList, error)

ListEndpoints obtains a list of Services.

func (*Registry) ListPods

func (r *Registry) ListPods(selector labels.Selector) (*api.PodList, error)

ListPods obtains a list of pods that match selector.

func (*Registry) ListServices

func (r *Registry) ListServices() (*api.ServiceList, error)

ListServices obtains a list of Services.

func (*Registry) UpdateController

func (r *Registry) UpdateController(controller *api.ReplicationController) error

UpdateController replaces an existing ReplicationController.

func (*Registry) UpdateEndpoints

func (r *Registry) UpdateEndpoints(e *api.Endpoints) error

UpdateEndpoints update Endpoints of a Service.

func (*Registry) UpdatePod

func (r *Registry) UpdatePod(pod *api.Pod) error

func (*Registry) UpdateService

func (r *Registry) UpdateService(svc *api.Service) error

UpdateService replaces an existing Service.

func (*Registry) WatchControllers

func (r *Registry) WatchControllers(resourceVersion uint64) (watch.Interface, error)

WatchControllers begins watching for new, changed, or deleted controllers.

func (*Registry) WatchEndpoints

func (r *Registry) WatchEndpoints(label, field labels.Selector, resourceVersion uint64) (watch.Interface, error)

WatchEndpoints begins watching for new, changed, or deleted endpoint configurations.

func (*Registry) WatchPods

func (r *Registry) WatchPods(resourceVersion uint64, filter func(*api.Pod) bool) (watch.Interface, error)

WatchPods begins watching for new, changed, or deleted pods.

func (*Registry) WatchServices

func (r *Registry) WatchServices(label, field labels.Selector, resourceVersion uint64) (watch.Interface, error)

WatchServices begins watching for new, changed, or deleted service configurations.

Jump to

Keyboard shortcuts

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