resource

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: AGPL-3.0, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddToScheme

func AddToScheme(objs ...Object) func(s *runtime.Scheme) error

AddToScheme returns a function to add the Objects to the scheme.

It registers objects returned by New and NewList under each object's GroupVersion. For storage-version objects it also registers them under the __internal group version. For non-storage versions it registers conversion functions via MultiVersionObject. If the object implements resourcestrategy.Defaulter, a defaulting function is registered.

func DeepCopy

func DeepCopy(src, dst runtime.Object) error

DeepCopy deep-copies object from src to dst using the DeepCopyInto method.

Types

type MultiVersionObject

type MultiVersionObject interface {
	NewStorageVersionObject() runtime.Object
	ConvertToStorageVersion(storageObj runtime.Object) error
	ConvertFromStorageVersion(storageObj runtime.Object) error
}

MultiVersionObject should be implemented if the resource is not the storage version.

type Object

type Object interface {
	runtime.Object
	rest.Scoper

	GetObjectMeta() *metav1.ObjectMeta
	New() runtime.Object
	NewList() runtime.Object
	GetGroupVersionResource() schema.GroupVersionResource
	IsStorageVersion() bool
}

Object must be implemented by all resources served by the apiserver.

type ObjectList

type ObjectList interface {
	runtime.Object
	GetListMeta() *metav1.ListMeta
}

ObjectList must be implemented by all resources' list object.

type ObjectWithStatusSubResource

type ObjectWithStatusSubResource interface {
	Object
	GetStatus() StatusSubResource
}

ObjectWithStatusSubResource defines an interface for getting and setting the status sub-resource for a resource.

type StatusSubResource

type StatusSubResource interface {
	SubResource
	CopyTo(parent ObjectWithStatusSubResource)
}

StatusSubResource defines required methods for implementing a status subresource.

type SubResource

type SubResource interface {
	SubResourceName() string
}

SubResource is the base interface for sub-resources.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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