package node
import "k8s.io/kubernetes/pkg/registry/core/node"
Package node provides Registry interface and implementation for storing Nodes.
Index ¶
- Variables
- func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, bool, error)
- func MatchNode(label labels.Selector, field fields.Selector) pkgstorage.SelectionPredicate
- func NodeNameTriggerFunc(obj runtime.Object) []pkgstorage.MatchValue
- func NodeToSelectableFields(node *api.Node) fields.Set
- func ResourceLocation(getter ResourceGetter, connection client.ConnectionInfoGetter, proxyTransport http.RoundTripper, ctx context.Context, id string) (*url.URL, http.RoundTripper, error)
- type Registry
- type ResourceGetter
Variables ¶
var StatusStrategy = nodeStatusStrategy{Strategy}
var Strategy = nodeStrategy{legacyscheme.Scheme, names.SimpleNameGenerator}
Nodes is the default logic that applies when creating and updating Node objects.
Functions ¶
func GetAttrs ¶
GetAttrs returns labels and fields of a given object for filtering purposes.
func MatchNode ¶
func MatchNode(label labels.Selector, field fields.Selector) pkgstorage.SelectionPredicate
MatchNode returns a generic matcher for a given label and field selector.
func NodeNameTriggerFunc ¶
func NodeNameTriggerFunc(obj runtime.Object) []pkgstorage.MatchValue
func NodeToSelectableFields ¶
NodeToSelectableFields returns a field set that represents the object.
func ResourceLocation ¶
func ResourceLocation(getter ResourceGetter, connection client.ConnectionInfoGetter, proxyTransport http.RoundTripper, ctx context.Context, id string) (*url.URL, http.RoundTripper, error)
ResourceLocation returns a URL and transport which one can use to send traffic for the specified node.
Types ¶
type Registry ¶
type Registry interface { ListNodes(ctx context.Context, options *metainternalversion.ListOptions) (*api.NodeList, error) CreateNode(ctx context.Context, node *api.Node, createValidation rest.ValidateObjectFunc) error UpdateNode(ctx context.Context, node *api.Node, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc) error GetNode(ctx context.Context, nodeID string, options *metav1.GetOptions) (*api.Node, error) DeleteNode(ctx context.Context, nodeID string) error WatchNodes(ctx context.Context, options *metainternalversion.ListOptions) (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(context.Context, string, *metav1.GetOptions) (runtime.Object, error) }
ResourceGetter is an interface for retrieving resources by ResourceLocation.
Source Files ¶
doc.go registry.go strategy.go
Directories ¶
Path | Synopsis |
---|---|
pkg/registry/core/node/rest | |
pkg/registry/core/node/storage |
- Version
- v1.11.0
- Published
- Jun 27, 2018
- Platform
- js/wasm
- Imports
- 25 packages
- Last checked
- 1 minute ago –
Tools for package owners.