kubernetes: github.com/igm/kubernetes/pkg/registry/etcd Index | Files

package etcd

import "github.com/igm/kubernetes/pkg/registry/etcd"

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

Index

Package Files

doc.go etcd.go

Constants

const (
    // PodPath is the path to pod resources in etcd
    PodPath string = "/registry/pods"
    // ControllerPath is the path to controller resources in etcd
    ControllerPath string = "/registry/controllers"
    // ServicePath is the path to service resources in etcd
    ServicePath string = "/registry/services/specs"
    // ServiceEndpointPath is the path to service endpoints resources in etcd
    ServiceEndpointPath string = "/registry/services/endpoints"
)

func MakeEtcdItemKey Uses

func MakeEtcdItemKey(ctx api.Context, prefix string, id string) (string, error)

MakeEtcdItemKey constructs etcd paths to a resource relative to prefix enforcing namespace rules. If no namespace is on context, it errors.

func MakeEtcdListKey Uses

func MakeEtcdListKey(ctx api.Context, prefix string) string

MakeEtcdListKey constructs etcd paths to resource directories enforcing namespace rules

type Registry Uses

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

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

func NewRegistry Uses

func NewRegistry(helper tools.EtcdHelper, boundPodFactory pod.BoundPodFactory) *Registry

NewRegistry creates an etcd registry.

func (*Registry) ApplyBinding Uses

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

ApplyBinding implements binding's registry

func (*Registry) CreateController Uses

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

CreateController creates a new ReplicationController.

func (*Registry) CreateMinion Uses

func (r *Registry) CreateMinion(ctx api.Context, minion *api.Minion) error

func (*Registry) CreatePod Uses

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

CreatePod creates a pod based on a specification.

func (*Registry) CreateService Uses

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

CreateService creates a new Service.

func (*Registry) DeleteController Uses

func (r *Registry) DeleteController(ctx api.Context, controllerID string) error

DeleteController deletes a ReplicationController specified by its ID.

func (*Registry) DeleteMinion Uses

func (r *Registry) DeleteMinion(ctx api.Context, minionID string) error

func (*Registry) DeletePod Uses

func (r *Registry) DeletePod(ctx api.Context, podID string) error

DeletePod deletes an existing pod specified by its ID.

func (*Registry) DeleteService Uses

func (r *Registry) DeleteService(ctx api.Context, name string) error

DeleteService deletes a Service specified by its name.

func (*Registry) GetController Uses

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

GetController gets a specific ReplicationController specified by its ID.

func (*Registry) GetEndpoints Uses

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

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

func (*Registry) GetMinion Uses

func (r *Registry) GetMinion(ctx api.Context, minionID string) (*api.Minion, error)

func (*Registry) GetPod Uses

func (r *Registry) GetPod(ctx api.Context, id string) (*api.Pod, error)

GetPod gets a specific pod specified by its ID.

func (*Registry) GetService Uses

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

GetService obtains a Service specified by its name.

func (*Registry) ListControllers Uses

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

ListControllers obtains a list of ReplicationControllers.

func (*Registry) ListEndpoints Uses

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

ListEndpoints obtains a list of Services.

func (*Registry) ListMinions Uses

func (r *Registry) ListMinions(ctx api.Context) (*api.MinionList, error)

func (*Registry) ListPods Uses

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

ListPods obtains a list of pods with labels that match selector.

func (*Registry) ListPodsPredicate Uses

func (r *Registry) ListPodsPredicate(ctx api.Context, filter func(*api.Pod) bool) (*api.PodList, error)

ListPodsPredicate obtains a list of pods that match filter.

func (*Registry) ListServices Uses

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

ListServices obtains a list of Services.

func (*Registry) UpdateController Uses

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

UpdateController replaces an existing ReplicationController.

func (*Registry) UpdateEndpoints Uses

func (r *Registry) UpdateEndpoints(ctx api.Context, endpoints *api.Endpoints) error

UpdateEndpoints update Endpoints of a Service.

func (*Registry) UpdateMinion Uses

func (r *Registry) UpdateMinion(ctx api.Context, minion *api.Minion) error

func (*Registry) UpdatePod Uses

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

func (*Registry) UpdateService Uses

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

UpdateService replaces an existing Service.

func (*Registry) WatchControllers Uses

func (r *Registry) WatchControllers(ctx api.Context, resourceVersion string) (watch.Interface, error)

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

func (*Registry) WatchEndpoints Uses

func (r *Registry) WatchEndpoints(ctx api.Context, label, field labels.Selector, resourceVersion string) (watch.Interface, error)

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

func (*Registry) WatchPods Uses

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

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

func (*Registry) WatchServices Uses

func (r *Registry) WatchServices(ctx api.Context, label, field labels.Selector, resourceVersion string) (watch.Interface, error)

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

Package etcd imports 12 packages (graph). Updated 2018-04-17. Refresh now. Tools for package owners.