proto

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ResourceCPU CPU, in cores. (500m = .5 cores)
	ResourceCPU = "cpu"
	// ResourceMemory Memory, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
	ResourceMemory = "memory"
	// ResourceStorage Volume size, in bytes (e,g. 5Gi = 5GiB = 5 * 1024 * 1024 * 1024)
	ResourceStorage = "storage"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args struct {
	Node Node
	Task Task
}

type Filter

type Filter interface {
	Filter(*Args) Status
}

type FilterPlugin

type FilterPlugin struct {
	Impl Filter
}

func (FilterPlugin) Client

func (FilterPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)

func (*FilterPlugin) Server

func (n *FilterPlugin) Server(*plugin.MuxBroker) (interface{}, error)

type FilterRPC

type FilterRPC struct {
	// contains filtered or unexported fields
}

func (*FilterRPC) Filter

func (n *FilterRPC) Filter(args *Args) Status

type FilterRPCServer

type FilterRPCServer struct {
	Impl Filter
}

func (*FilterRPCServer) Filter

func (n *FilterRPCServer) Filter(args *Args, resp *Status) error

type Label added in v1.0.0

type Label map[string]string

type Node

type Node struct {
	AllocatableResource Resource `json:"allocatableResource"`
	Label               Label    `json:"label"`
	Name                string   `json:"name"`
	RequestedResource   Resource `json:"requestedResource"`
	Unschedulable       bool     `json:"unschedulable"`
}

type Resource added in v1.0.0

type Resource struct {
	MilliCPU int64 `json:"milliCPU"`
	Memory   int64 `json:"memory"`
	Storage  int64 `json:"storage"`
}

type Selector added in v1.0.0

type Selector map[string][]string

type Status

type Status struct {
	Error string
}

type Task

type Task struct {
	NodeName               string   `json:"nodeName"`
	NodeSelector           Selector `json:"nodeSelector"`
	RequestedResource      Resource `json:"requestedResource"`
	ToleratesUnschedulable bool     `json:"toleratesUnschedulable"`
}

Jump to

Keyboard shortcuts

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