serverds

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NodePushed int32

NodePushed used to notice lease_controller when SetNodeOwnerFunc.

Functions

func DumpModelSetInfo

func DumpModelSetInfo(modelset map[string]sets.String) string

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 ToGpuPod added in v0.2.0

func ToGpuPod(nodeName string, base *gpupodv1.GpuPod, prd *jsonstruct.PodResourcesDetail) *gpupodv1.GpuPod

Types

type CacheGpuInfo

type CacheGpuInfo struct {
	*GpuInfo
	LastUpdateTime time.Time
}

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)

Jump to

Keyboard shortcuts

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