Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertTimestampToUnixMS(timestamp string) (*int64, error)
- func Hash(s string) uint32
- func IsPodSpecWithoutBridgeUpdateLabelChanged(prevSpec *pod.PodSpec, newSpec *pod.PodSpec) bool
- func RemoveBridgeUpdateLabel(podSpec *pod.PodSpec) string
- type JobUpdateStatusSet
- type Random
- type RandomImpl
Constants ¶
const ( Preemptible = "preemptible" Revocable = "revocable" Preferred = "preferred" )
Aurora scheduling tiers.
const AuroraGpuResourceKey = "udeploy_num_gpus"
AuroraGpuResourceKey is the label set to indicate the number of GPUs to be allocated to the task.
const BridgeUpdateLabelKey = "aurora_bridge_update"
BridgeUpdateLabelKey is the Peloton pod level label key for triggering a forced PodSpec change.
const MesosHostAttr = "host"
MesosHostAttr is the Mesos attribute for hostname.
Variables ¶
var BridgeJobLabel = &peloton.Label{
Key: "aurora_bridge",
Value: "com.uber.peloton.internal.aurorabridge",
}
BridgeJobLabel is the common Peloton job level label for all jobs created by aurora bridge.
var BridgePodLabel = &peloton.Label{
Key: "aurora_bridge_pod",
Value: "com.uber.peloton.internal.aurorabridge_pod",
}
BridgePodLabel is the common Peloton pod level label for all jobs created by aurora bridge.
Functions ¶
func ConvertTimestampToUnixMS ¶
ConvertTimestampToUnixMS converts Peloton event timestamp string (in seconds) to unix time in milliseconds used by Bridge.
func IsPodSpecWithoutBridgeUpdateLabelChanged ¶
IsPodSpecWithoutBridgeUpdateLabelChanged check if two PodSpec without "bridge update label" are changed.
func RemoveBridgeUpdateLabel ¶
RemoveBridgeUpdateLabel removes "bridge update label" from pod spec and returns the label value.
Types ¶
type JobUpdateStatusSet ¶
type JobUpdateStatusSet struct {
// contains filtered or unexported fields
}
JobUpdateStatusSet is an immutable set of JobUpdateStatuses.
func NewJobUpdateStatusSet ¶
func NewJobUpdateStatusSet(statuses ...api.JobUpdateStatus) *JobUpdateStatusSet
NewJobUpdateStatusSet creates a new JobUpdateStatusSet.
func (*JobUpdateStatusSet) Has ¶
func (s *JobUpdateStatusSet) Has(x api.JobUpdateStatus) bool
Has returns whether x is in s.
func (*JobUpdateStatusSet) String ¶
func (s *JobUpdateStatusSet) String() string
type Random ¶
type Random interface {
RandomUUID() string
}
Random defines an interface for generating random string.
type RandomImpl ¶
type RandomImpl struct{}
RandomImpl implements Random interface
func (RandomImpl) RandomUUID ¶
func (r RandomImpl) RandomUUID() string
RandomUUID proxies call to uuid.New() function and returns a random UUID string