internal

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLoggingLevels

func GetLoggingLevels() string

func Logger

func Logger(l *logrus.Logger)

Logger sets the logger available to the internal package

func MaintenanceMonitorPrint

func MaintenanceMonitorPrint(hostResult map[string]bool, desiredStates []aurora.MaintenanceMode, toJson bool)

func ToJSON

func ToJSON(v interface{}) string

ToJSON converts an interface to a JSON formatted string

func UnmarshalTaskConfig added in v1.0.4

func UnmarshalTaskConfig(filename string) (*aurora.TaskConfig, error)

Types

type BatchStrategy

type BatchStrategy struct {
	GroupSize int32 `yaml:"groupSize"`
	AutoPause bool  `yaml:"autoPause"`
}

type Container

type Container struct {
	Docker *DockerContainer `yaml:"docker"`
}

type DockerContainer

type DockerContainer struct {
	Name string `yaml:"name"`
	Tag  string `yaml:"tag"`
}

type Executor

type Executor struct {
	Name string `yaml:"name"`
	Data string `yaml:"data"`
}

type InstanceRange

type InstanceRange struct {
	First int32 `yaml:"first"`
	Last  int32 `yaml:"last"`
}

type Job

type Job struct {
	Environment         string            `yaml:"environment"`
	Role                string            `yaml:"role"`
	Name                string            `yaml:"name"`
	CPU                 float64           `yaml:"cpu"`
	RAM                 int64             `yaml:"ram"`
	Disk                int64             `yaml:"disk"`
	Port                int64             `yaml:"port"`
	GPU                 int64             `yaml:"gpu"`
	Executor            Executor          `yaml:"executor"`
	Instances           int32             `yaml:"instances"`
	MaxFailures         int32             `yaml:"maxFailures"`
	URIs                []URI             `yaml:"uris"`
	Metadata            map[string]string `yaml:"labels"`
	Service             bool              `yaml:"service"`
	Tier                string            `yaml:"tier,omitempty" default:"preemptible"`
	Priority            int32             `yaml:"priority"`
	Production          bool              `yaml:"production"`
	Thermos             []ThermosProcess  `yaml:",flow,omitempty"`
	Container           *Container        `yaml:"container,omitempty"`
	CronSchedule        *string           `yaml:"cronSchedule,omitempty"`
	CronCollisionPolicy *string           `yaml:"cronCollisionPolicy,omitempty"`
	ValueConstraints    []ValueConstraint `yaml:"valueConstraints,flow,omitempty"`
	LimitConstraints    []LimitConstraint `yaml:"limitConstraints,flow,omitempty"`
}

func UnmarshalJob

func UnmarshalJob(filename string) (Job, error)

func (*Job) ToRealis

func (j *Job) ToRealis() (*realis.AuroraJob, error)

func (*Job) Validate

func (j *Job) Validate() error

func (*Job) ValidateCron

func (j *Job) ValidateCron() error

type LimitConstraint added in v1.0.2

type LimitConstraint struct {
	Name  string `yaml:"name"`
	Limit int32  `yaml:"limit"`
}

type MonitorCmdConfig

type MonitorCmdConfig struct {
	Cmd                             *cobra.Command
	MonitorInterval, MonitorTimeout time.Duration
	StatusList                      []string
}

type QueueStrategy

type QueueStrategy struct {
	GroupSize int32 `yaml:"groupSize"`
}

type ThermosProcess

type ThermosProcess struct {
	Name string `yaml:"name"`
	Cmd  string `yaml:"cmd"`
}

type URI

type URI struct {
	URI     string `yaml:"uri"`
	Extract bool   `yaml:"extract"`
	Cache   bool   `yaml:"cache"`
}

type UpdateJob

type UpdateJob struct {
	JobConfig      Job            `yaml:"jobConfig"`
	UpdateSettings UpdateSettings `yaml:"updateSettings"`
}

func UnmarshalUpdate

func UnmarshalUpdate(filename string) (UpdateJob, error)

func (*UpdateJob) ToRealis

func (u *UpdateJob) ToRealis() (*realis.JobUpdate, error)

type UpdateSettings

type UpdateSettings struct {
	MaxPerInstanceFailures int32           `yaml:"maxPerInstanceFailures"`
	MaxFailedInstances     int32           `yaml:"maxFailedInstances"`
	MinTimeInRunning       time.Duration   `yaml:"minTimeInRunning"`
	RollbackOnFailure      bool            `yaml:"rollbackOnFailure"`
	InstanceRanges         []InstanceRange `yaml:"instanceRanges"`
	InstanceCount          int32           `yaml:"instanceCount"`
	PulseTimeout           time.Duration   `yaml:"pulseTimeout"`
	SLAAware               bool            `yaml:"slaAware"`
	Strategy               UpdateStrategy  `yaml:"strategy"`
}

func (*UpdateSettings) Validate

func (u *UpdateSettings) Validate() error

type UpdateStrategy

type UpdateStrategy struct {
	VariableBatch *VariableBatchStrategy `yaml:"variableBatch"`
	Batch         *BatchStrategy         `yaml:"batch"`
	Queue         *QueueStrategy         `yaml:"queue"`
}

type ValueConstraint added in v1.0.2

type ValueConstraint struct {
	Name    string   `yaml:"name"`
	Values  []string `yaml:"values"`
	Negated bool     `yaml:"negated"`
}

type VariableBatchStrategy

type VariableBatchStrategy struct {
	GroupSizes []int32 `yaml:"groupSizes"`
	AutoPause  bool    `yaml:"autoPause"`
}

Jump to

Keyboard shortcuts

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