services

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstallAPIHandler

func InstallAPIHandler(mux mux, e *Engine, sched *scheduler.Scheduler, isLeader func() bool)

func ResponseErrorMessage

func ResponseErrorMessage(c *gin.Context, statusCode int, format string, args ...interface{})

Types

type APIServiceProvider

type APIServiceProvider interface {
	RegisterEndpoints(group *gin.RouterGroup)
}

type Engine

type Engine struct {
	*gin.Engine
}

func NewEngine

func NewEngine(e *gin.Engine) *Engine

func (*Engine) RegisterPluginService

func (e *Engine) RegisterPluginService(plugin framework.Plugin)

type ErrorMessage

type ErrorMessage struct {
	Message string `json:"message,omitempty"`
}

type HostPortInfo

type HostPortInfo map[string][]framework.ProtocolPort

HostPortInfo stores mapping from ip to a set of ProtocolPort

type NodeInfo

type NodeInfo struct {
	// Overall Node information.
	Node *corev1.Node `json:"node,omitempty"`
	// Pods running on the node.
	Pods []*framework.PodInfo `json:"pods,omitempty"`

	// The subset of pods with affinity.
	PodsWithAffinity []*framework.PodInfo `json:"podsWithAffinity,omitempty"`

	// The subset of pods with required anti-affinity.
	PodsWithRequiredAntiAffinity []*framework.PodInfo `json:"podsWithRequiredAntiAffinity,omitempty"`

	// Ports allocated on the node.
	UsedPorts HostPortInfo `json:"usedPorts,omitempty"`

	// Total requested resources of all pods on this node. This includes assumed
	// pods, which scheduler has sent for binding, but may not be scheduled yet.
	Requested *framework.Resource `json:"requested,omitempty"`
	// Total requested resources of all pods on this node with a minimum value
	// applied to each container's CPU and memory requests. This does not reflect
	// the actual resource requests for this node, but is used to avoid scheduling
	// many zero-request pods onto one node.
	NonZeroRequested *framework.Resource `json:"nonZeroRequested,omitempty"`

	// The total amount of remaining resources
	Remaining *framework.Resource `json:"remaining,omitempty"`

	// We store allocatedResources (which is Node.Status.Allocatable.*) explicitly
	// as int64, to avoid conversions and accessing map.
	Allocatable *framework.Resource `json:"allocatable,omitempty"`

	// ImageStates holds the entry of an image if and only if this image is on the node. The entry can be used for
	// checking an image's existence and advanced usage (e.g., image locality scheduling policy) based on the image
	// state information.
	ImageStates map[string]*framework.ImageStateSummary `json:"imageStates,omitempty"`

	// PVCRefCounts contains a mapping of PVC names to the number of pods on the node using it.
	// Keys are in the format "namespace/name".
	PVCRefCounts map[string]int `json:"pvcRefCounts,omitempty"`

	// Whenever NodeInfo changes, generation is bumped.
	// This is used to avoid cloning it if the object didn't change.
	Generation int64 `json:"generation,omitempty"`
}

Jump to

Keyboard shortcuts

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