scaler

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 ScalerType = "scaler"

Variables

This section is empty.

Functions

func FromTrait

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

Types

type NullableScalerSpec

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

func NewNullableScalerSpec

func NewNullableScalerSpec(val *ScalerSpec) *NullableScalerSpec

func (*NullableScalerSpec) Get

func (v *NullableScalerSpec) Get() *ScalerSpec

func (*NullableScalerSpec) IsSet

func (v *NullableScalerSpec) IsSet() bool

func (NullableScalerSpec) MarshalJSON

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

func (*NullableScalerSpec) Set

func (v *NullableScalerSpec) Set(val *ScalerSpec)

func (*NullableScalerSpec) UnmarshalJSON

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

func (*NullableScalerSpec) Unset

func (v *NullableScalerSpec) Unset()

type ScalerSpec

type ScalerSpec struct {
	// Specify the number of workload
	Replicas *int32 `json:"replicas"`
}

ScalerSpec struct for ScalerSpec

func NewScalerSpec

func NewScalerSpec() *ScalerSpec

NewScalerSpec is short for NewScalerSpecWithDefault which instantiates a new ScalerSpec 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 NewScalerSpecEmpty

func NewScalerSpecEmpty() *ScalerSpec

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

func NewScalerSpecList

func NewScalerSpecList(ps ...*ScalerSpec) []ScalerSpec

NewScalerSpecs converts a list ScalerSpec pointers to objects. This is helpful when the SetScalerSpec requires a list of objects

func NewScalerSpecWith

func NewScalerSpecWith(replicas int32) *ScalerSpec

NewScalerSpecWith instantiates a new ScalerSpec 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 NewScalerSpecWithDefault

func NewScalerSpecWithDefault() *ScalerSpec

NewScalerSpecWithDefault instantiates a new ScalerSpec 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 (ScalerSpec) MarshalJSON

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

func (ScalerSpec) ToMap

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

type ScalerTrait

type ScalerTrait struct {
	Base       apis.TraitBase
	Properties ScalerSpec
}

func Scaler

func Scaler() *ScalerTrait

func (*ScalerTrait) Build

func (s *ScalerTrait) Build() common.ApplicationTrait

func (*ScalerTrait) DefType

func (s *ScalerTrait) DefType() string

func (*ScalerTrait) FromTrait

func (s *ScalerTrait) FromTrait(from common.ApplicationTrait) (*ScalerTrait, error)

func (*ScalerTrait) GetReplicas

func (o *ScalerTrait) GetReplicas() int32

GetReplicas returns the Replicas field value

func (*ScalerTrait) GetReplicasOk

func (o *ScalerTrait) GetReplicasOk() (*int32, bool)

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

func (*ScalerTrait) SetReplicas

func (o *ScalerTrait) SetReplicas(v int32) *ScalerTrait

SetReplicas sets field value

func (*ScalerTrait) Validate

func (o *ScalerTrait) Validate() error

Validate validates this ScalerSpec 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