Documentation ¶
Index ¶
- Variables
- func DumpModelSetInfo(modelset map[string]sets.String) string
- func EnsureGetCaFromSecrets(kubeclient kubernetes.Interface) (cacert []byte)
- func SetNodeOwnerFunc(c gpuclientset.Interface, nodeNS, nodeName string) func(lease *coordinationv1.Lease) error
- func ToGpuNode(nodeName string, base *gpunodev1.GpuNode, ngi *jsonstruct.NodeGpuInfo, ...) *gpunodev1.GpuNode
- func ToGpuPod(nodeName string, base *gpupodv1.GpuPod, prd *jsonstruct.PodResourcesDetail) *gpupodv1.GpuPod
- type CacheGpuInfo
- type TTLCacheGpu
Constants ¶
This section is empty.
Variables ¶
View Source
var NodePushed int32
NodePushed used to notice lease_controller when SetNodeOwnerFunc.
Functions ¶
func EnsureGetCaFromSecrets ¶
func EnsureGetCaFromSecrets(kubeclient kubernetes.Interface) (cacert []byte)
EnsureGetCaFromSecrets block until get the ca from secret
func SetNodeOwnerFunc ¶ added in v0.2.0
func SetNodeOwnerFunc(c gpuclientset.Interface, nodeNS, nodeName string) func(lease *coordinationv1.Lease) error
SetNodeOwnerFunc helps construct a newLeasePostProcessFunc which sets a node OwnerReference to the given lease object
func ToGpuNode ¶ added in v0.2.0
func ToGpuNode(nodeName string, base *gpunodev1.GpuNode, ngi *jsonstruct.NodeGpuInfo, prm map[string]*podresourcesapi.PodResources) *gpunodev1.GpuNode
func ToGpuPod ¶ added in v0.2.0
func ToGpuPod(nodeName string, base *gpupodv1.GpuPod, prd *jsonstruct.PodResourcesDetail) *gpupodv1.GpuPod
Types ¶
type CacheGpuInfo ¶
type TTLCacheGpu ¶
type TTLCacheGpu struct {
// contains filtered or unexported fields
}
TTLCacheGpu store for GpuInfo, in case of calling getGpuInfo echo interval PRODUCE_INTERVAL
func NewTTLCacheGpu ¶
func NewTTLCacheGpu(ttl time.Duration) *TTLCacheGpu
func (*TTLCacheGpu) GetCacheGpuInfo ¶
func (cg *TTLCacheGpu) GetCacheGpuInfo(did string) *GpuInfo
func (*TTLCacheGpu) GetCacheGpuInfoIgnoreTTL ¶
func (cg *TTLCacheGpu) GetCacheGpuInfoIgnoreTTL(did string) *GpuInfo
func (*TTLCacheGpu) SetCacheGpuInfo ¶
func (cg *TTLCacheGpu) SetCacheGpuInfo(did string, cgpuinfo *CacheGpuInfo)
Click to show internal directories.
Click to hide internal directories.