label

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: 7 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildPartialAuroraJobKeyLabels

func BuildPartialAuroraJobKeyLabels(role, env, name string) []*peloton.Label

BuildPartialAuroraJobKeyLabels is a utility for creating labels for each set parameter. Useful for job queries.

func GetUdeployGpuLimit

func GetUdeployGpuLimit(md []*api.Metadata) (*float64, error)

GetUdeployGpuLimit extracts uDeploy specific label used for requesting GPU resources, and returns it as float pointer. Nil pointer is returned if the label does not exist.

func IsGpuConfig

func IsGpuConfig(md []*api.Metadata, rs []*api.Resource) bool

IsGpuConfig returns true if the uDeploy specific label used to request GPU resources is present in the metadata

func NewAuroraJobKey

func NewAuroraJobKey(k *api.JobKey) *peloton.Label

NewAuroraJobKey creates a label for the original Aurora JobKey which was mapped into a Peloton job. Useful for simulating task per host limits.

func NewAuroraJobKeyEnvironment

func NewAuroraJobKeyEnvironment(env string) *peloton.Label

NewAuroraJobKeyEnvironment creates a label for the original Aurora JobKey environment was mapped into a Peloton job. Useful for querying jobs by environment.

func NewAuroraJobKeyName

func NewAuroraJobKeyName(name string) *peloton.Label

NewAuroraJobKeyName creates a label for the original Aurora JobKey name which was mapped into a Peloton job. Useful for querying jobs by name.

func NewAuroraJobKeyRole

func NewAuroraJobKeyRole(role string) *peloton.Label

NewAuroraJobKeyRole creates a label for the original Aurora JobKey role which was mapped into a Peloton job. Useful for querying jobs by role.

func NewAuroraMetadataLabels

func NewAuroraMetadataLabels(md []*api.Metadata) []*peloton.Label

NewAuroraMetadataLabels generates a list of labels using Aurora's format for compatibility purposes.

func ParseAuroraMetadata

func ParseAuroraMetadata(ls []*peloton.Label) []*api.Metadata

ParseAuroraMetadata converts Peloton label to a list of Aurora Metadata. The label for aurora metadata must be present, otherwise an error will be returned.

Types

type AuroraJobKey

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

AuroraJobKey is a label for the original Aurora JobKey which was mapped into a job.

Jump to

Keyboard shortcuts

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