hpa

package
v0.0.0-...-3d8ba93 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const HpaType = "hpa"

Variables

This section is empty.

Functions

func FromTrait

func FromTrait(from common.ApplicationTrait) (apis.Trait, error)

Types

type Cpu

type Cpu struct {
	// Specify resource metrics in terms of percentage(\"Utilization\") or direct value(\"AverageValue\")
	Type *string `json:"type"`
	// Specify the value of CPU utilization or averageValue
	Value *int32 `json:"value"`
}

Cpu struct for Cpu

func NewCpu

func NewCpu() *Cpu

NewCpu is short for NewCpuWithDefault which instantiates a new Cpu object. This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func NewCpuEmpty

func NewCpuEmpty() *Cpu

NewCpuEmpty instantiates a new Cpu object with no properties set. This constructor will not assign any default values to properties.

func NewCpuList

func NewCpuList(ps ...*Cpu) []Cpu

NewCpus converts a list Cpu pointers to objects. This is helpful when the SetCpu requires a list of objects

func NewCpuWith

func NewCpuWith(type_ string, value int32) *Cpu

NewCpuWith instantiates a new Cpu object This constructor will make sure properties required by API are set. For optional properties, it will set default values if they have been defined. The set of arguments will change when the set of required properties is changed

func NewCpuWithDefault

func NewCpuWithDefault() *Cpu

NewCpuWithDefault instantiates a new Cpu object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*Cpu) GetType

func (o *Cpu) GetType() string

GetType returns the Type field value

func (*Cpu) GetTypeOk

func (o *Cpu) GetTypeOk() (*string, bool)

GetTypeOk returns a tuple with the Type field value and a boolean to check if the value has been set.

func (*Cpu) GetValue

func (o *Cpu) GetValue() int32

GetValue returns the Value field value

func (*Cpu) GetValueOk

func (o *Cpu) GetValueOk() (*int32, bool)

GetValueOk returns a tuple with the Value field value and a boolean to check if the value has been set.

func (Cpu) MarshalJSON

func (o Cpu) MarshalJSON() ([]byte, error)

func (*Cpu) SetType

func (o *Cpu) SetType(v string) *Cpu

SetType sets field value

func (*Cpu) SetValue

func (o *Cpu) SetValue(v int32) *Cpu

SetValue sets field value

func (Cpu) ToMap

func (o Cpu) ToMap() (map[string]interface{}, error)

func (*Cpu) Validate

func (o *Cpu) Validate() error

Validate validates this Cpu 1. If the required properties are not set, this will return an error 2. If properties are set, will check if nested required properties are set

type HpaSpec

type HpaSpec struct {
	Cpu *Cpu `json:"cpu"`
	// Specify the maximum number of of replicas to which the autoscaler can scale up
	Max *int32 `json:"max"`
	Mem *Mem   `json:"mem,omitempty"`
	// Specify the minimal number of replicas to which the autoscaler can scale down
	Min *int32 `json:"min"`
	// Specify custom metrics of pod type
	PodCustomMetrics []PodCustomMetrics `json:"podCustomMetrics,omitempty"`
	// Specify the apiVersion of scale target
	TargetAPIVersion *string `json:"targetAPIVersion"`
	// Specify the kind of scale target
	TargetKind *string `json:"targetKind"`
}

HpaSpec struct for HpaSpec

func NewHpaSpec

func NewHpaSpec() *HpaSpec

NewHpaSpec is short for NewHpaSpecWithDefault which instantiates a new HpaSpec object. This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func NewHpaSpecEmpty

func NewHpaSpecEmpty() *HpaSpec

NewHpaSpecEmpty instantiates a new HpaSpec object with no properties set. This constructor will not assign any default values to properties.

func NewHpaSpecList

func NewHpaSpecList(ps ...*HpaSpec) []HpaSpec

NewHpaSpecs converts a list HpaSpec pointers to objects. This is helpful when the SetHpaSpec requires a list of objects

func NewHpaSpecWith

func NewHpaSpecWith(cpu Cpu, max int32, min int32, targetAPIVersion string, targetKind string) *HpaSpec

NewHpaSpecWith instantiates a new HpaSpec object This constructor will make sure properties required by API are set. For optional properties, it will set default values if they have been defined. The set of arguments will change when the set of required properties is changed

func NewHpaSpecWithDefault

func NewHpaSpecWithDefault() *HpaSpec

NewHpaSpecWithDefault instantiates a new HpaSpec object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (HpaSpec) MarshalJSON

func (o HpaSpec) MarshalJSON() ([]byte, error)

func (HpaSpec) ToMap

func (o HpaSpec) ToMap() (map[string]interface{}, error)

type HpaTrait

type HpaTrait struct {
	Base       apis.TraitBase
	Properties HpaSpec
}

func Hpa

func Hpa() *HpaTrait

func (*HpaTrait) Build

func (h *HpaTrait) Build() common.ApplicationTrait

func (*HpaTrait) DefType

func (h *HpaTrait) DefType() string

func (*HpaTrait) FromTrait

func (h *HpaTrait) FromTrait(from common.ApplicationTrait) (*HpaTrait, error)

func (*HpaTrait) GetCpu

func (o *HpaTrait) GetCpu() Cpu

GetCpu returns the Cpu field value

func (*HpaTrait) GetCpuOk

func (o *HpaTrait) GetCpuOk() (*Cpu, bool)

GetCpuOk returns a tuple with the Cpu field value and a boolean to check if the value has been set.

func (*HpaTrait) GetMax

func (o *HpaTrait) GetMax() int32

GetMax returns the Max field value

func (*HpaTrait) GetMaxOk

func (o *HpaTrait) GetMaxOk() (*int32, bool)

GetMaxOk returns a tuple with the Max field value and a boolean to check if the value has been set.

func (*HpaTrait) GetMem

func (o *HpaTrait) GetMem() Mem

GetMem returns the Mem field value if set, zero value otherwise.

func (*HpaTrait) GetMemOk

func (o *HpaTrait) GetMemOk() (*Mem, bool)

GetMemOk returns a tuple with the Mem field value if set, nil otherwise and a boolean to check if the value has been set.

func (*HpaTrait) GetMin

func (o *HpaTrait) GetMin() int32

GetMin returns the Min field value

func (*HpaTrait) GetMinOk

func (o *HpaTrait) GetMinOk() (*int32, bool)

GetMinOk returns a tuple with the Min field value and a boolean to check if the value has been set.

func (*HpaTrait) GetPodCustomMetrics

func (o *HpaTrait) GetPodCustomMetrics() []PodCustomMetrics

GetPodCustomMetrics returns the PodCustomMetrics field value if set, zero value otherwise.

func (*HpaTrait) GetPodCustomMetricsOk

func (o *HpaTrait) GetPodCustomMetricsOk() ([]PodCustomMetrics, bool)

GetPodCustomMetricsOk returns a tuple with the PodCustomMetrics field value if set, nil otherwise and a boolean to check if the value has been set.

func (*HpaTrait) GetTargetAPIVersion

func (o *HpaTrait) GetTargetAPIVersion() string

GetTargetAPIVersion returns the TargetAPIVersion field value

func (*HpaTrait) GetTargetAPIVersionOk

func (o *HpaTrait) GetTargetAPIVersionOk() (*string, bool)

GetTargetAPIVersionOk returns a tuple with the TargetAPIVersion field value and a boolean to check if the value has been set.

func (*HpaTrait) GetTargetKind

func (o *HpaTrait) GetTargetKind() string

GetTargetKind returns the TargetKind field value

func (*HpaTrait) GetTargetKindOk

func (o *HpaTrait) GetTargetKindOk() (*string, bool)

GetTargetKindOk returns a tuple with the TargetKind field value and a boolean to check if the value has been set.

func (*HpaTrait) HasMem

func (o *HpaTrait) HasMem() bool

HasMem returns a boolean if a field has been set.

func (*HpaTrait) HasPodCustomMetrics

func (o *HpaTrait) HasPodCustomMetrics() bool

HasPodCustomMetrics returns a boolean if a field has been set.

func (*HpaTrait) SetCpu

func (o *HpaTrait) SetCpu(v Cpu) *HpaTrait

SetCpu sets field value

func (*HpaTrait) SetMax

func (o *HpaTrait) SetMax(v int32) *HpaTrait

SetMax sets field value

func (*HpaTrait) SetMem

func (o *HpaTrait) SetMem(v Mem) *HpaTrait

SetMem gets a reference to the given Mem and assigns it to the mem field. Mem:

func (*HpaTrait) SetMin

func (o *HpaTrait) SetMin(v int32) *HpaTrait

SetMin sets field value

func (*HpaTrait) SetPodCustomMetrics

func (o *HpaTrait) SetPodCustomMetrics(v []PodCustomMetrics) *HpaTrait

SetPodCustomMetrics gets a reference to the given []PodCustomMetrics and assigns it to the podCustomMetrics field. PodCustomMetrics: Specify custom metrics of pod type

func (*HpaTrait) SetTargetAPIVersion

func (o *HpaTrait) SetTargetAPIVersion(v string) *HpaTrait

SetTargetAPIVersion sets field value

func (*HpaTrait) SetTargetKind

func (o *HpaTrait) SetTargetKind(v string) *HpaTrait

SetTargetKind sets field value

func (*HpaTrait) Validate

func (o *HpaTrait) Validate() error

Validate validates this HpaSpec 1. If the required properties are not set, this will return an error 2. If properties are set, will check if nested required properties are set

type Mem

type Mem struct {
	// Specify resource metrics in terms of percentage(\"Utilization\") or direct value(\"AverageValue\")
	Type *string `json:"type"`
	// Specify  the value of MEM utilization or averageValue
	Value *int32 `json:"value"`
}

Mem struct for Mem

func NewMem

func NewMem() *Mem

NewMem is short for NewMemWithDefault which instantiates a new Mem object. This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func NewMemEmpty

func NewMemEmpty() *Mem

NewMemEmpty instantiates a new Mem object with no properties set. This constructor will not assign any default values to properties.

func NewMemList

func NewMemList(ps ...*Mem) []Mem

NewMems converts a list Mem pointers to objects. This is helpful when the SetMem requires a list of objects

func NewMemWith

func NewMemWith(type_ string, value int32) *Mem

NewMemWith instantiates a new Mem object This constructor will make sure properties required by API are set. For optional properties, it will set default values if they have been defined. The set of arguments will change when the set of required properties is changed

func NewMemWithDefault

func NewMemWithDefault() *Mem

NewMemWithDefault instantiates a new Mem object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*Mem) GetType

func (o *Mem) GetType() string

GetType returns the Type field value

func (*Mem) GetTypeOk

func (o *Mem) GetTypeOk() (*string, bool)

GetTypeOk returns a tuple with the Type field value and a boolean to check if the value has been set.

func (*Mem) GetValue

func (o *Mem) GetValue() int32

GetValue returns the Value field value

func (*Mem) GetValueOk

func (o *Mem) GetValueOk() (*int32, bool)

GetValueOk returns a tuple with the Value field value and a boolean to check if the value has been set.

func (Mem) MarshalJSON

func (o Mem) MarshalJSON() ([]byte, error)

func (*Mem) SetType

func (o *Mem) SetType(v string) *Mem

SetType sets field value

func (*Mem) SetValue

func (o *Mem) SetValue(v int32) *Mem

SetValue sets field value

func (Mem) ToMap

func (o Mem) ToMap() (map[string]interface{}, error)

func (*Mem) Validate

func (o *Mem) Validate() error

Validate validates this Mem 1. If the required properties are not set, this will return an error 2. If properties are set, will check if nested required properties are set

type NullableCpu

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

func NewNullableCpu

func NewNullableCpu(val *Cpu) *NullableCpu

func (*NullableCpu) Get

func (v *NullableCpu) Get() *Cpu

func (*NullableCpu) IsSet

func (v *NullableCpu) IsSet() bool

func (NullableCpu) MarshalJSON

func (v NullableCpu) MarshalJSON() ([]byte, error)

func (*NullableCpu) Set

func (v *NullableCpu) Set(val *Cpu)

func (*NullableCpu) UnmarshalJSON

func (v *NullableCpu) UnmarshalJSON(src []byte) error

func (*NullableCpu) Unset

func (v *NullableCpu) Unset()

type NullableHpaSpec

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

func NewNullableHpaSpec

func NewNullableHpaSpec(val *HpaSpec) *NullableHpaSpec

func (*NullableHpaSpec) Get

func (v *NullableHpaSpec) Get() *HpaSpec

func (*NullableHpaSpec) IsSet

func (v *NullableHpaSpec) IsSet() bool

func (NullableHpaSpec) MarshalJSON

func (v NullableHpaSpec) MarshalJSON() ([]byte, error)

func (*NullableHpaSpec) Set

func (v *NullableHpaSpec) Set(val *HpaSpec)

func (*NullableHpaSpec) UnmarshalJSON

func (v *NullableHpaSpec) UnmarshalJSON(src []byte) error

func (*NullableHpaSpec) Unset

func (v *NullableHpaSpec) Unset()

type NullableMem

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

func NewNullableMem

func NewNullableMem(val *Mem) *NullableMem

func (*NullableMem) Get

func (v *NullableMem) Get() *Mem

func (*NullableMem) IsSet

func (v *NullableMem) IsSet() bool

func (NullableMem) MarshalJSON

func (v NullableMem) MarshalJSON() ([]byte, error)

func (*NullableMem) Set

func (v *NullableMem) Set(val *Mem)

func (*NullableMem) UnmarshalJSON

func (v *NullableMem) UnmarshalJSON(src []byte) error

func (*NullableMem) Unset

func (v *NullableMem) Unset()

type NullablePodCustomMetrics

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

func NewNullablePodCustomMetrics

func NewNullablePodCustomMetrics(val *PodCustomMetrics) *NullablePodCustomMetrics

func (*NullablePodCustomMetrics) Get

func (*NullablePodCustomMetrics) IsSet

func (v *NullablePodCustomMetrics) IsSet() bool

func (NullablePodCustomMetrics) MarshalJSON

func (v NullablePodCustomMetrics) MarshalJSON() ([]byte, error)

func (*NullablePodCustomMetrics) Set

func (*NullablePodCustomMetrics) UnmarshalJSON

func (v *NullablePodCustomMetrics) UnmarshalJSON(src []byte) error

func (*NullablePodCustomMetrics) Unset

func (v *NullablePodCustomMetrics) Unset()

type PodCustomMetrics

type PodCustomMetrics struct {
	// Specify name of custom metrics
	Name *string `json:"name"`
	// Specify target value of custom metrics
	Value *string `json:"value"`
}

PodCustomMetrics struct for PodCustomMetrics

func NewPodCustomMetrics

func NewPodCustomMetrics() *PodCustomMetrics

NewPodCustomMetrics is short for NewPodCustomMetricsWithDefault which instantiates a new PodCustomMetrics object. This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func NewPodCustomMetricsEmpty

func NewPodCustomMetricsEmpty() *PodCustomMetrics

NewPodCustomMetricsEmpty instantiates a new PodCustomMetrics object with no properties set. This constructor will not assign any default values to properties.

func NewPodCustomMetricsList

func NewPodCustomMetricsList(ps ...*PodCustomMetrics) []PodCustomMetrics

NewPodCustomMetricss converts a list PodCustomMetrics pointers to objects. This is helpful when the SetPodCustomMetrics requires a list of objects

func NewPodCustomMetricsWith

func NewPodCustomMetricsWith(name string, value string) *PodCustomMetrics

NewPodCustomMetricsWith instantiates a new PodCustomMetrics object This constructor will make sure properties required by API are set. For optional properties, it will set default values if they have been defined. The set of arguments will change when the set of required properties is changed

func NewPodCustomMetricsWithDefault

func NewPodCustomMetricsWithDefault() *PodCustomMetrics

NewPodCustomMetricsWithDefault instantiates a new PodCustomMetrics object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*PodCustomMetrics) GetName

func (o *PodCustomMetrics) GetName() string

GetName returns the Name field value

func (*PodCustomMetrics) GetNameOk

func (o *PodCustomMetrics) GetNameOk() (*string, bool)

GetNameOk returns a tuple with the Name field value and a boolean to check if the value has been set.

func (*PodCustomMetrics) GetValue

func (o *PodCustomMetrics) GetValue() string

GetValue returns the Value field value

func (*PodCustomMetrics) GetValueOk

func (o *PodCustomMetrics) GetValueOk() (*string, bool)

GetValueOk returns a tuple with the Value field value and a boolean to check if the value has been set.

func (PodCustomMetrics) MarshalJSON

func (o PodCustomMetrics) MarshalJSON() ([]byte, error)

func (*PodCustomMetrics) SetName

func (o *PodCustomMetrics) SetName(v string) *PodCustomMetrics

SetName sets field value

func (*PodCustomMetrics) SetValue

func (o *PodCustomMetrics) SetValue(v string) *PodCustomMetrics

SetValue sets field value

func (PodCustomMetrics) ToMap

func (o PodCustomMetrics) ToMap() (map[string]interface{}, error)

func (*PodCustomMetrics) Validate

func (o *PodCustomMetrics) Validate() error

Validate validates this PodCustomMetrics 1. If the required properties are not set, this will return an error 2. If properties are set, will check if nested required properties are set

Jump to

Keyboard shortcuts

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