dynamic-resource-allocationk8s.io/dynamic-resource-allocation/api Index | Files

package api

import "k8s.io/dynamic-resource-allocation/api"

Package api contains a variant of the API where strings are unique. These unique strings are faster to compare and more efficient when used as key in a map.

+k8s:conversion-gen=k8s.io/api/resource/v1alpha3

Index

Variables

var (
	AddToScheme = localSchemeBuilder.AddToScheme
)

Functions

func Convert_api_BasicDevice_To_v1alpha3_BasicDevice

func Convert_api_BasicDevice_To_v1alpha3_BasicDevice(in *BasicDevice, out *v1alpha3.BasicDevice, s conversion.Scope) error

Convert_api_BasicDevice_To_v1alpha3_BasicDevice is an autogenerated conversion function.

func Convert_api_DeviceAttribute_To_v1alpha3_DeviceAttribute

func Convert_api_DeviceAttribute_To_v1alpha3_DeviceAttribute(in *DeviceAttribute, out *v1alpha3.DeviceAttribute, s conversion.Scope) error

Convert_api_DeviceAttribute_To_v1alpha3_DeviceAttribute is an autogenerated conversion function.

func Convert_api_Device_To_v1alpha3_Device

func Convert_api_Device_To_v1alpha3_Device(in *Device, out *v1alpha3.Device, s conversion.Scope) error

Convert_api_Device_To_v1alpha3_Device is an autogenerated conversion function.

func Convert_api_ResourcePool_To_v1alpha3_ResourcePool

func Convert_api_ResourcePool_To_v1alpha3_ResourcePool(in *ResourcePool, out *v1alpha3.ResourcePool, s conversion.Scope) error

Convert_api_ResourcePool_To_v1alpha3_ResourcePool is an autogenerated conversion function.

func Convert_api_ResourceSliceSpec_To_v1alpha3_ResourceSliceSpec

func Convert_api_ResourceSliceSpec_To_v1alpha3_ResourceSliceSpec(in *ResourceSliceSpec, out *v1alpha3.ResourceSliceSpec, s conversion.Scope) error

Convert_api_ResourceSliceSpec_To_v1alpha3_ResourceSliceSpec is an autogenerated conversion function.

func Convert_api_ResourceSlice_To_v1alpha3_ResourceSlice

func Convert_api_ResourceSlice_To_v1alpha3_ResourceSlice(in *ResourceSlice, out *v1alpha3.ResourceSlice, s conversion.Scope) error

Convert_api_ResourceSlice_To_v1alpha3_ResourceSlice is an autogenerated conversion function.

func Convert_api_UniqueString_To_string

func Convert_api_UniqueString_To_string(in *UniqueString, out *string, s conversion.Scope) error

func Convert_string_To_api_UniqueString

func Convert_string_To_api_UniqueString(in *string, out *UniqueString, s conversion.Scope) error

func Convert_v1alpha3_BasicDevice_To_api_BasicDevice

func Convert_v1alpha3_BasicDevice_To_api_BasicDevice(in *v1alpha3.BasicDevice, out *BasicDevice, s conversion.Scope) error

Convert_v1alpha3_BasicDevice_To_api_BasicDevice is an autogenerated conversion function.

func Convert_v1alpha3_DeviceAttribute_To_api_DeviceAttribute

func Convert_v1alpha3_DeviceAttribute_To_api_DeviceAttribute(in *v1alpha3.DeviceAttribute, out *DeviceAttribute, s conversion.Scope) error

Convert_v1alpha3_DeviceAttribute_To_api_DeviceAttribute is an autogenerated conversion function.

func Convert_v1alpha3_Device_To_api_Device

func Convert_v1alpha3_Device_To_api_Device(in *v1alpha3.Device, out *Device, s conversion.Scope) error

Convert_v1alpha3_Device_To_api_Device is an autogenerated conversion function.

func Convert_v1alpha3_ResourcePool_To_api_ResourcePool

func Convert_v1alpha3_ResourcePool_To_api_ResourcePool(in *v1alpha3.ResourcePool, out *ResourcePool, s conversion.Scope) error

Convert_v1alpha3_ResourcePool_To_api_ResourcePool is an autogenerated conversion function.

func Convert_v1alpha3_ResourceSliceSpec_To_api_ResourceSliceSpec

func Convert_v1alpha3_ResourceSliceSpec_To_api_ResourceSliceSpec(in *v1alpha3.ResourceSliceSpec, out *ResourceSliceSpec, s conversion.Scope) error

Convert_v1alpha3_ResourceSliceSpec_To_api_ResourceSliceSpec is an autogenerated conversion function.

func Convert_v1alpha3_ResourceSlice_To_api_ResourceSlice

func Convert_v1alpha3_ResourceSlice_To_api_ResourceSlice(in *v1alpha3.ResourceSlice, out *ResourceSlice, s conversion.Scope) error

Convert_v1alpha3_ResourceSlice_To_api_ResourceSlice is an autogenerated conversion function.

func RegisterConversions

func RegisterConversions(s *runtime.Scheme) error

RegisterConversions adds conversion functions to the given scheme. Public to allow building arbitrary schemes.

Types

type BasicDevice

type BasicDevice struct {
	Attributes map[QualifiedName]DeviceAttribute
	Capacity   map[QualifiedName]resource.Quantity
}

type Device

type Device struct {
	Name  UniqueString
	Basic *BasicDevice
}

type DeviceAttribute

type DeviceAttribute struct {
	IntValue     *int64
	BoolValue    *bool
	StringValue  *string
	VersionValue *string
}

type FullyQualifiedName

type FullyQualifiedName string

type QualifiedName

type QualifiedName string

type ResourcePool

type ResourcePool struct {
	Name               UniqueString
	Generation         int64
	ResourceSliceCount int64
}

type ResourceSlice

type ResourceSlice struct {
	metav1.TypeMeta
	metav1.ObjectMeta
	Spec ResourceSliceSpec
}

type ResourceSliceSpec

type ResourceSliceSpec struct {
	Driver       UniqueString
	Pool         ResourcePool
	NodeName     UniqueString
	NodeSelector *v1.NodeSelector
	AllNodes     bool
	Devices      []Device
}

type UniqueString

type UniqueString unique.Handle[string]

UniqueString is a wrapper around [unique.Handle[string]].

var NullUniqueString UniqueString

NullUniqueString is a UniqueString which contains no string.

func MakeUniqueString

func MakeUniqueString(str string) UniqueString

MakeUniqueString constructs a new unique string.

func (UniqueString) String

func (us UniqueString) String() string

Returns the string that is stored in the UniqueString. If the UniqueString is null, the empty string is returned.

Source Files

conversion.go doc.go types.go uniquestring.go zz_generated.conversion.go

Version
v0.32.0-beta.0
Published
Nov 6, 2024
Platform
js/wasm
Imports
8 packages
Last checked
14 seconds ago

Tools for package owners.