models

package
v0.0.0-...-a69e935 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 3 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HostResources

type HostResources struct {
	Slack    scalar.Resources
	NonSlack scalar.Resources
}

HostResources is a non-thread safe helper struct holding the Slack and NonSlack resources for a host.

func (HostResources) Add

Add adds other resources onto current one.

func (HostResources) Contains

func (r HostResources) Contains(other HostResources) bool

Contains determines whether current Resources is large enough to contain the other one.

func (HostResources) Subtract

func (r HostResources) Subtract(other HostResources) HostResources

Subtract the other host resource from current one.

func (HostResources) TrySubtract

func (r HostResources) TrySubtract(other HostResources) (HostResources, bool)

TrySubtract attempts to subtract a host resource from current one but returns false if other has more resources.

type LaunchablePod

type LaunchablePod struct {
	PodId *peloton.PodID
	Spec  *pbpod.PodSpec
	Ports map[string]uint32
}

LaunchablePod is a struct contains info to launch a pod

Jump to

Keyboard shortcuts

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