Documentation ¶
Overview ¶
Package example is the internal version of the example.pingcap.com api group for e2e testing +k8s:deepcopy-gen=package,register +groupName=example.pingcap.com
Index ¶
- Variables
- func Kind(kind string) schema.GroupKind
- func RegisterDefaults(scheme *runtime.Scheme) error
- func Resource(resource string) schema.GroupResource
- type ContainerSpec
- type Pod
- func (in *Pod) DeepCopy() *Pod
- func (in *Pod) DeepCopyInto(out *Pod)
- func (in *Pod) DeepCopyObject() runtime.Object
- func (pc Pod) GetGeneration() int64
- func (pc *Pod) GetObjectMeta() *metav1.ObjectMeta
- func (pc *Pod) GetSpec() interface{}
- func (pc *Pod) GetStatus() interface{}
- func (Pod) NewStatus() interface{}
- func (pc *Pod) SetGeneration(generation int64)
- func (pc *Pod) SetSpec(s interface{})
- func (pc *Pod) SetStatus(s interface{})
- type PodList
- type PodRegistry
- type PodSpec
- type PodStatus
- type PodStatusStrategy
- type PodStrategy
Constants ¶
This section is empty.
Variables ¶
var ( ExamplePodStorage = builders.NewApiResource( InternalPod, func() runtime.Object { return &Pod{} }, func() runtime.Object { return &PodList{} }, &PodStrategy{builders.StorageStrategySingleton}, ) InternalPod = builders.NewInternalResource( "pods", "Pod", func() runtime.Object { return &Pod{} }, func() runtime.Object { return &PodList{} }, ) InternalPodStatus = builders.NewInternalResourceStatus( "pods", "PodStatus", func() runtime.Object { return &Pod{} }, func() runtime.Object { return &PodList{} }, ) // Registered resources and subresources ApiVersion = builders.NewApiGroup("example.pingcap.com").WithKinds( InternalPod, InternalPodStatus, ) // Required by code generated by go2idl AddToScheme = (&runtime.SchemeBuilder{ ApiVersion.SchemeBuilder.AddToScheme, RegisterDefaults, }).AddToScheme SchemeBuilder = ApiVersion.SchemeBuilder SchemeGroupVersion = ApiVersion.GroupVersion )
Functions ¶
func Kind ¶
Required by code generated by go2idl Kind takes an unqualified kind and returns a Group qualified GroupKind
func RegisterDefaults ¶
RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.
func Resource ¶
func Resource(resource string) schema.GroupResource
Required by code generated by go2idl Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type ContainerSpec ¶
func (*ContainerSpec) DeepCopy ¶
func (in *ContainerSpec) DeepCopy() *ContainerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerSpec.
func (*ContainerSpec) DeepCopyInto ¶
func (in *ContainerSpec) DeepCopyInto(out *ContainerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Pod ¶
func (*Pod) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pod.
func (*Pod) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Pod) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (Pod) GetGeneration ¶
func (*Pod) GetObjectMeta ¶
func (pc *Pod) GetObjectMeta() *metav1.ObjectMeta
func (*Pod) SetGeneration ¶
type PodList ¶
func (*PodList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodList.
func (*PodList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PodRegistry ¶
type PodRegistry interface { ListPods(ctx context.Context, options *internalversion.ListOptions) (*PodList, error) GetPod(ctx context.Context, id string, options *metav1.GetOptions) (*Pod, error) CreatePod(ctx context.Context, id *Pod) (*Pod, error) UpdatePod(ctx context.Context, id *Pod) (*Pod, error) DeletePod(ctx context.Context, id string) (bool, error) }
Registry is an interface for things that know how to store Pod. +k8s:deepcopy-gen=false
func NewPodRegistry ¶
func NewPodRegistry(sp builders.StandardStorageProvider) PodRegistry
NewRegistry returns a new Registry interface for the given Storage. Any mismatched types will panic.
type PodSpec ¶
type PodSpec struct { // New field introduced in v1beta1 to store multiple containers Containers []ContainerSpec // In real case, we design the v1alpha1 API first, so we must keep this // field to be backward compatible with the objects written formerly Container ContainerSpec NodeSelector map[string]string Tolerations []string HostName string // helper field to distinguish whether the .spec.tolerations is unset or empty HasTolerations bool }
PodSpec is the internal version of pod spec
func (*PodSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSpec.
func (*PodSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodStatus ¶
type PodStatus struct {
Phase string
}
func (*PodStatus) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodStatus.
func (*PodStatus) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodStatusStrategy ¶
type PodStatusStrategy struct {
builders.DefaultStatusStorageStrategy
}
+k8s:deepcopy-gen=false
type PodStrategy ¶
type PodStrategy struct {
builders.DefaultStorageStrategy
}
Pod Functions and Structs
+k8s:deepcopy-gen=false
func (PodStrategy) PrepareForUpdate ¶
func (p PodStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object)
func (PodStrategy) ValidateUpdate ¶
ValidateUpdate checks if the update is valid
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package v1alpha1 the v1alpha1 version of the example.pingcap.com api group.
|
Package v1alpha1 the v1alpha1 version of the example.pingcap.com api group. |
Package v1beta1 is the v1beta1 version of the example.pingcap.com api group.
|
Package v1beta1 is the v1beta1 version of the example.pingcap.com api group. |