Documentation ¶
Index ¶
- Variables
- type EngineParams
- func (ep *EngineParams) Add(ep1 *EngineParams)
- func (ep *EngineParams) AsRawParams() resourcetypes.RawParams
- func (ep *EngineParams) Count() int
- func (ep *EngineParams) DeepCopy() *EngineParams
- func (ep *EngineParams) Parse(rawParams resourcetypes.RawParams) error
- func (ep *EngineParams) Sub(ep1 *EngineParams)
- type NUMA
- type NodeResource
- func (r *NodeResource) Add(r1 *NodeResource)
- func (r *NodeResource) AsRawParams() resourcetypes.RawParams
- func (r *NodeResource) Count() int
- func (r *NodeResource) DeepCopy() *NodeResource
- func (r *NodeResource) Parse(rawParams resourcetypes.RawParams) error
- func (r *NodeResource) Sub(r1 *NodeResource)
- func (r *NodeResource) Validate() error
- type NodeResourceInfo
- type NodeResourceRequest
- type ProdCountMap
- func (pcm ProdCountMap) Add(g1 ProdCountMap)
- func (pcm ProdCountMap) DeepCopy() ProdCountMap
- func (pcm ProdCountMap) RemoveLTE0()
- func (pcm ProdCountMap) Sub(g1 ProdCountMap)
- func (pcm ProdCountMap) TotalCount() int
- func (pcm ProdCountMap) Validate() error
- func (pcm ProdCountMap) ValidateCount() error
- func (pcm ProdCountMap) ValidateProd() error
- type WorkloadResource
- func (w *WorkloadResource) Add(w1 *WorkloadResource)
- func (w *WorkloadResource) AsRawParams() resourcetypes.RawParams
- func (w *WorkloadResource) Count() int
- func (w *WorkloadResource) DeepCopy() *WorkloadResource
- func (w *WorkloadResource) Parse(rawParams resourcetypes.RawParams) error
- func (w *WorkloadResource) Sub(w1 *WorkloadResource)
- func (w *WorkloadResource) Validate() error
- type WorkloadResourceRequest
- func (w *WorkloadResourceRequest) Count() int
- func (w *WorkloadResourceRequest) DeepCopy() *WorkloadResourceRequest
- func (w *WorkloadResourceRequest) MergeFromResource(r *WorkloadResource)
- func (w *WorkloadResourceRequest) Parse(rawParams resourcetypes.RawParams) (err error)
- func (w *WorkloadResourceRequest) Validate() error
- func (w *WorkloadResourceRequest) ValidateProd() error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type EngineParams ¶
type EngineParams struct {
ProdCountMap ProdCountMap `json:"prod_count_map" mapstructure:"prod_count_map"`
}
EngineParams .
func (*EngineParams) Add ¶
func (ep *EngineParams) Add(ep1 *EngineParams)
func (*EngineParams) AsRawParams ¶
func (ep *EngineParams) AsRawParams() resourcetypes.RawParams
func (*EngineParams) Count ¶
func (ep *EngineParams) Count() int
func (*EngineParams) DeepCopy ¶
func (ep *EngineParams) DeepCopy() *EngineParams
func (*EngineParams) Parse ¶
func (ep *EngineParams) Parse(rawParams resourcetypes.RawParams) error
func (*EngineParams) Sub ¶
func (ep *EngineParams) Sub(ep1 *EngineParams)
type NodeResource ¶
type NodeResource struct {
ProdCountMap ProdCountMap `json:"prod_count_map" mapstructure:"prod_count_map"`
}
NodeResource indicate node cpumem resource
func NewNodeResource ¶
func NewNodeResource(gm ProdCountMap) *NodeResource
func (*NodeResource) AsRawParams ¶
func (r *NodeResource) AsRawParams() resourcetypes.RawParams
func (*NodeResource) Parse ¶
func (r *NodeResource) Parse(rawParams resourcetypes.RawParams) error
Parse .
func (*NodeResource) Validate ¶
func (r *NodeResource) Validate() error
type NodeResourceInfo ¶
type NodeResourceInfo struct { Capacity *NodeResource `json:"capacity"` Usage *NodeResource `json:"usage"` }
NodeResourceInfo indicate cpumem capacity and usage
func (*NodeResourceInfo) CapCount ¶
func (n *NodeResourceInfo) CapCount() int
func (*NodeResourceInfo) DeepCopy ¶
func (n *NodeResourceInfo) DeepCopy() *NodeResourceInfo
DeepCopy .
func (*NodeResourceInfo) GetAvailableResource ¶
func (n *NodeResourceInfo) GetAvailableResource() *NodeResource
func (*NodeResourceInfo) UsageCount ¶
func (n *NodeResourceInfo) UsageCount() int
func (*NodeResourceInfo) Validate ¶
func (n *NodeResourceInfo) Validate() error
type NodeResourceRequest ¶
type NodeResourceRequest struct {
ProdCountMap ProdCountMap `json:"prod_count_map" mapstructure:"prod_count_map"`
}
NodeResourceRequest includes all possible fields passed by eru-core for editing node, it not parsed!
func (*NodeResourceRequest) Count ¶
func (n *NodeResourceRequest) Count() int
func (*NodeResourceRequest) LoadFromOrigin ¶
func (n *NodeResourceRequest) LoadFromOrigin(nodeResource *NodeResource, resourceRequest resourcetypes.RawParams)
Merge fields to NodeResourceRequest.
func (*NodeResourceRequest) Parse ¶
func (n *NodeResourceRequest) Parse(rawParams resourcetypes.RawParams) error
func (*NodeResourceRequest) Validate ¶
func (n *NodeResourceRequest) Validate() error
type ProdCountMap ¶
func (ProdCountMap) Add ¶
func (pcm ProdCountMap) Add(g1 ProdCountMap)
func (ProdCountMap) DeepCopy ¶
func (pcm ProdCountMap) DeepCopy() ProdCountMap
func (ProdCountMap) RemoveLTE0 ¶
func (pcm ProdCountMap) RemoveLTE0()
func (ProdCountMap) Sub ¶
func (pcm ProdCountMap) Sub(g1 ProdCountMap)
func (ProdCountMap) TotalCount ¶
func (pcm ProdCountMap) TotalCount() int
func (ProdCountMap) Validate ¶
func (pcm ProdCountMap) Validate() error
func (ProdCountMap) ValidateCount ¶
func (pcm ProdCountMap) ValidateCount() error
func (ProdCountMap) ValidateProd ¶
func (pcm ProdCountMap) ValidateProd() error
type WorkloadResource ¶
type WorkloadResource struct {
ProdCountMap ProdCountMap `json:"prod_count_map" mapstructure:"prod_count_map"`
}
WorkloadResource indicate GPU workload resource
func (*WorkloadResource) AsRawParams ¶
func (w *WorkloadResource) AsRawParams() resourcetypes.RawParams
func (*WorkloadResource) DeepCopy ¶
func (w *WorkloadResource) DeepCopy() *WorkloadResource
DeepCopy .
func (*WorkloadResource) Parse ¶
func (w *WorkloadResource) Parse(rawParams resourcetypes.RawParams) error
ParseFromRawParams .
func (*WorkloadResource) Validate ¶
func (w *WorkloadResource) Validate() error
type WorkloadResourceRequest ¶
type WorkloadResourceRequest struct {
ProdCountMap ProdCountMap `json:"prod_count_map" mapstructure:"prod_count_map"`
}
WorkloadResourceRaw includes all possible fields passed by eru-core for editing workload for request calculation
func (*WorkloadResourceRequest) Count ¶
func (w *WorkloadResourceRequest) Count() int
func (*WorkloadResourceRequest) DeepCopy ¶
func (w *WorkloadResourceRequest) DeepCopy() *WorkloadResourceRequest
func (*WorkloadResourceRequest) MergeFromResource ¶
func (w *WorkloadResourceRequest) MergeFromResource(r *WorkloadResource)
func (*WorkloadResourceRequest) Parse ¶
func (w *WorkloadResourceRequest) Parse(rawParams resourcetypes.RawParams) (err error)
Parse .
func (*WorkloadResourceRequest) Validate ¶
func (w *WorkloadResourceRequest) Validate() error
func (*WorkloadResourceRequest) ValidateProd ¶
func (w *WorkloadResourceRequest) ValidateProd() error
Validate .
Click to show internal directories.
Click to hide internal directories.