package etcd
import "k8s.io/kubernetes/pkg/registry/etcd"
Package etcd provides etcd backend implementation for storing PodRegistry, ControllerRegistry and ServiceRegistry api objects.
Index ¶
- Constants
- func MakeEtcdItemKey(ctx api.Context, prefix string, id string) (string, error)
- func MakeEtcdListKey(ctx api.Context, prefix string) string
- type Registry
- func NewRegistry(helper tools.EtcdHelper, pods pod.Registry, endpoints endpoint.Registry) *Registry
- func (r *Registry) CreateController(ctx api.Context, controller *api.ReplicationController) (*api.ReplicationController, error)
- func (r *Registry) CreateService(ctx api.Context, svc *api.Service) (*api.Service, error)
- func (r *Registry) DeleteController(ctx api.Context, controllerID string) error
- func (r *Registry) DeleteService(ctx api.Context, name string) error
- func (r *Registry) GetController(ctx api.Context, controllerID string) (*api.ReplicationController, error)
- func (r *Registry) GetService(ctx api.Context, name string) (*api.Service, error)
- func (r *Registry) ListControllers(ctx api.Context) (*api.ReplicationControllerList, error)
- func (r *Registry) ListServices(ctx api.Context) (*api.ServiceList, error)
- func (r *Registry) UpdateController(ctx api.Context, controller *api.ReplicationController) (*api.ReplicationController, error)
- func (r *Registry) UpdateService(ctx api.Context, svc *api.Service) (*api.Service, error)
- func (r *Registry) WatchControllers(ctx api.Context, label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
- func (r *Registry) WatchServices(ctx api.Context, label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
Constants ¶
const ( // ControllerPath is the path to controller resources in etcd ControllerPath string = "/controllers" // ServicePath is the path to service resources in etcd ServicePath string = "/services/specs" )
Functions ¶
func MakeEtcdItemKey ¶
MakeEtcdItemKey constructs etcd paths to a resource relative to prefix enforcing namespace rules. If no namespace is on context, it errors.
func MakeEtcdListKey ¶
MakeEtcdListKey constructs etcd paths to resource directories enforcing namespace rules
Types ¶
type Registry ¶
type Registry struct { tools.EtcdHelper // contains filtered or unexported fields }
Registry implements BindingRegistry, ControllerRegistry, EndpointRegistry, MinionRegistry, PodRegistry and ServiceRegistry, backed by etcd.
func NewRegistry ¶
NewRegistry creates an etcd registry.
func (*Registry) CreateController ¶
func (r *Registry) CreateController(ctx api.Context, controller *api.ReplicationController) (*api.ReplicationController, error)
CreateController creates a new ReplicationController.
func (*Registry) CreateService ¶
CreateService creates a new Service.
func (*Registry) DeleteController ¶
DeleteController deletes a ReplicationController specified by its ID.
func (*Registry) DeleteService ¶
DeleteService deletes a Service specified by its name.
func (*Registry) GetController ¶
func (r *Registry) GetController(ctx api.Context, controllerID string) (*api.ReplicationController, error)
GetController gets a specific ReplicationController specified by its ID.
func (*Registry) GetService ¶
GetService obtains a Service specified by its name.
func (*Registry) ListControllers ¶
ListControllers obtains a list of ReplicationControllers.
func (*Registry) ListServices ¶
ListServices obtains a list of Services.
func (*Registry) UpdateController ¶
func (r *Registry) UpdateController(ctx api.Context, controller *api.ReplicationController) (*api.ReplicationController, error)
UpdateController replaces an existing ReplicationController.
func (*Registry) UpdateService ¶
UpdateService replaces an existing Service.
func (*Registry) WatchControllers ¶
func (r *Registry) WatchControllers(ctx api.Context, label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
WatchControllers begins watching for new, changed, or deleted controllers.
func (*Registry) WatchServices ¶
func (r *Registry) WatchServices(ctx api.Context, label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
WatchServices begins watching for new, changed, or deleted service configurations.
Source Files ¶
doc.go etcd.go
- Version
- v0.16.2
- Published
- May 4, 2015
- Platform
- js/wasm
- Imports
- 12 packages
- Last checked
- 1 minute ago –
Tools for package owners.