package node

import "k8s.io/kubernetes/pkg/registry/node"

Package node provides Registry interface and implementation for storing Nodes.

Index

Variables

var StatusStrategy = nodeStatusStrategy{Strategy}
var Strategy = nodeStrategy{api.Scheme, api.SimpleNameGenerator}

Nodes is the default logic that applies when creating and updating Node objects.

Functions

func MatchNode

func MatchNode(label labels.Selector, field fields.Selector) generic.Matcher

MatchNode returns a generic matcher for a given label and field selector.

func NodeToSelectableFields

func NodeToSelectableFields(node *api.Node) fields.Set

NodeToSelectableFields returns a label set that represents the object.

func ResourceLocation

func ResourceLocation(getter ResourceGetter, connection client.ConnectionInfoGetter, proxyTransport http.RoundTripper, ctx api.Context, id string) (*url.URL, http.RoundTripper, error)

ResourceLocation returns an URL and transport which one can use to send traffic for the specified node.

Types

type Registry

type Registry interface {
	ListNodes(ctx api.Context, label labels.Selector, field fields.Selector) (*api.NodeList, error)
	CreateNode(ctx api.Context, node *api.Node) error
	UpdateNode(ctx api.Context, node *api.Node) error
	GetNode(ctx api.Context, nodeID string) (*api.Node, error)
	DeleteNode(ctx api.Context, nodeID string) error
	WatchNodes(ctx api.Context, label labels.Selector, field fields.Selector, resourceVersion string) (watch.Interface, error)
}

Registry is an interface for things that know how to store node.

func NewRegistry

func NewRegistry(s rest.StandardStorage) Registry

NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic.

type ResourceGetter

type ResourceGetter interface {
	Get(api.Context, string) (runtime.Object, error)
}

ResourceGetter is an interface for retrieving resources by ResourceLocation.

Source Files

doc.go registry.go strategy.go

Directories

PathSynopsis
pkg/registry/node/etcd
Version
v1.1.9-beta.0
Published
Feb 23, 2016
Platform
linux/amd64
Imports
19 packages
Last checked
3 minutes ago

Tools for package owners.