Documentation
¶
Overview ¶
Copyright 2024 The HAMi Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func NewWebHook() (*admission.Webhook, error)
- type NodeUsage
- type PodUseDeviceStat
- type Scheduler
- func (s *Scheduler) Bind(args extenderv1.ExtenderBindingArgs) (*extenderv1.ExtenderBindingResult, error)
- func (s *Scheduler) Filter(args extenderv1.ExtenderArgs) (*extenderv1.ExtenderFilterResult, error)
- func (m *Scheduler) GetNode(nodeID string) (*util.NodeInfo, error)
- func (m *Scheduler) GetScheduledPods() (map[k8stypes.UID]*podInfo, error)
- func (s *Scheduler) InspectAllNodesUsage() *map[string]*NodeUsage
- func (m *Scheduler) ListNodes() (map[string]*util.NodeInfo, error)
- func (m *Scheduler) ListPodsInfo() []*podInfo
- func (m *Scheduler) ListPodsUID() ([]*corev1.Pod, error)
- func (s *Scheduler) RegisterFromNodeAnnotations()
- func (s *Scheduler) Start()
- func (s *Scheduler) Stop()
Constants ¶
const ( // EventReasonFilteringFailed indicates that filtering failed. EventReasonFilteringFailed = "FilteringFailed" // EventReasonFilteringSucceed indicates that filtering succeed. EventReasonFilteringSucceed = "FilteringSucceed" // EventReasonBindingFailed indicates that binding failed. EventReasonBindingFailed = "BindingFailed" // EventReasonBindingSucceed indicates that binding succeed. EventReasonBindingSucceed = "BindingSucceed" )
Define events for ResourceBinding, ResourceFilter objects and their associated resources.
Variables ¶
This section is empty.
Functions ¶
func NewWebHook ¶
Types ¶
type NodeUsage ¶
type NodeUsage struct {
Devices policy.DeviceUsageList
}
type PodUseDeviceStat ¶
type PodUseDeviceStat struct { // count current node all running success pod num TotalPod int // only running success pod and use device pod can count. UseDevicePod int }
PodUseDeviceStat count pod use device info.
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func NewScheduler ¶
func NewScheduler() *Scheduler
func (*Scheduler) Bind ¶
func (s *Scheduler) Bind(args extenderv1.ExtenderBindingArgs) (*extenderv1.ExtenderBindingResult, error)
func (*Scheduler) Filter ¶
func (s *Scheduler) Filter(args extenderv1.ExtenderArgs) (*extenderv1.ExtenderFilterResult, error)
func (*Scheduler) GetScheduledPods ¶
func (*Scheduler) InspectAllNodesUsage ¶
InspectAllNodesUsage is used by metrics monitor.
func (*Scheduler) ListPodsInfo ¶
func (m *Scheduler) ListPodsInfo() []*podInfo
func (*Scheduler) ListPodsUID ¶
func (*Scheduler) RegisterFromNodeAnnotations ¶
func (s *Scheduler) RegisterFromNodeAnnotations()