condition

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Overview

+kubebuilder:object:generate=true

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthGenerated        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenerated          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type Condition

type Condition struct {
	metav1.Condition `json:",inline" yaml:",inline" protobuf:"bytes,1,opt,name=condition"`
}

+k8s:openapi-gen=true

func ConditionFailed

func ConditionFailed(ctype ConditionType, msg string) Condition

func ConditionFalse

func ConditionFalse() Condition

func ConditionReady

func ConditionReady(ctype ConditionType) Condition

func ConditionTrue

func ConditionTrue() Condition

func ConditionUpdate

func ConditionUpdate(ctype ConditionType, reason, msg string) Condition

func Failed

func Failed(msg string) Condition

Failed returns a condition that indicates the resource failed to get reconciled.

func Ready

func Ready() Condition

Ready returns a condition that indicates the resource is ready for use.

func Unknown

func Unknown() Condition

Unknown returns a condition that indicates the resource is in an unknown status.

func (*Condition) DeepCopy

func (in *Condition) DeepCopy() *Condition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Condition) Descriptor

func (*Condition) Descriptor() ([]byte, []int)

func (Condition) Equal

func (c Condition) Equal(other Condition) bool

Equal returns true if the condition is identical to the supplied condition, ignoring the LastTransitionTime.

func (*Condition) Marshal

func (m *Condition) Marshal() (dAtA []byte, err error)

func (*Condition) MarshalTo

func (m *Condition) MarshalTo(dAtA []byte) (int, error)

func (*Condition) MarshalToSizedBuffer

func (m *Condition) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Condition) ProtoMessage

func (*Condition) ProtoMessage()

func (*Condition) Reset

func (m *Condition) Reset()

func (*Condition) Size

func (m *Condition) Size() (n int)

func (*Condition) String

func (this *Condition) String() string

func (*Condition) Unmarshal

func (m *Condition) Unmarshal(dAtA []byte) error

func (Condition) WithMessage

func (c Condition) WithMessage(msg string) Condition

WithMessage returns a condition by adding the provided message to existing condition.

func (*Condition) XXX_DiscardUnknown

func (m *Condition) XXX_DiscardUnknown()

func (*Condition) XXX_Marshal

func (m *Condition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Condition) XXX_Merge

func (m *Condition) XXX_Merge(src proto.Message)

func (*Condition) XXX_Size

func (m *Condition) XXX_Size() int

func (*Condition) XXX_Unmarshal

func (m *Condition) XXX_Unmarshal(b []byte) error

type ConditionReason

type ConditionReason string

A ConditionReason represents the reason a resource is in a condition.

const (
	ConditionReasonReady   ConditionReason = "Ready"
	ConditionReasonFailed  ConditionReason = "Failed"
	ConditionReasonUnknown ConditionReason = "Unknown"
)

Reasons a resource is ready or not

type ConditionType

type ConditionType string

A ConditionType represents a condition type for a given KRM resource

const (
	// ConditionTypeReady represents the resource ready condition
	ConditionTypeReady ConditionType = "Ready"
	ConditionTypeTrue  ConditionType = "True"
	ConditionTypeFalse ConditionType = "False"
	ConditionTypeEnd   ConditionType = "End"
)

Condition Types.

const (
	ReadinessGate_PkgSchedule ConditionType = "pkg.pkgserver.dev/schedule"
	ReadinessGate_PkgProcess  ConditionType = "pkg.pkgserver.dev/process"
	ReadinessGate_PkgPolicy   ConditionType = "pkg.pkgserver.dev/policy"
	ReadinessGate_PkgApprove  ConditionType = "pkg.pkgserver.dev/approve"
	ReadinessGate_PkgInstall  ConditionType = "pkg.pkgserver.dev/install"
)

type ConditionedStatus

type ConditionedStatus struct {
	// Conditions of the resource.
	// +optional
	Conditions []Condition `json:"conditions,omitempty" protobuf:"bytes,1,rep,name=conditions"`
}

+k8s:openapi-gen=true A ConditionedStatus reflects the observed status of a resource. Only one condition of each type may exist.

func NewConditionedStatus

func NewConditionedStatus(c ...Condition) *ConditionedStatus

NewConditionedStatus returns a stat with the supplied conditions set.

func (*ConditionedStatus) DeepCopy

func (in *ConditionedStatus) DeepCopy() *ConditionedStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionedStatus.

func (*ConditionedStatus) DeepCopyInto

func (in *ConditionedStatus) DeepCopyInto(out *ConditionedStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ConditionedStatus) Descriptor

func (*ConditionedStatus) Descriptor() ([]byte, []int)

func (*ConditionedStatus) Equal

func (r *ConditionedStatus) Equal(other *ConditionedStatus) bool

Equal returns true if the status is identical to the supplied status, ignoring the LastTransitionTimes and order of statuses.

func (*ConditionedStatus) GetCondition

func (r *ConditionedStatus) GetCondition(t ConditionType) Condition

GetCondition returns the condition for the given ConditionKind if exists, otherwise returns nil

func (*ConditionedStatus) HasCondition

func (r *ConditionedStatus) HasCondition(t ConditionType) bool

HasCondition returns if the condition is set

func (*ConditionedStatus) Marshal

func (m *ConditionedStatus) Marshal() (dAtA []byte, err error)

func (*ConditionedStatus) MarshalTo

func (m *ConditionedStatus) MarshalTo(dAtA []byte) (int, error)

func (*ConditionedStatus) MarshalToSizedBuffer

func (m *ConditionedStatus) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ConditionedStatus) ProtoMessage

func (*ConditionedStatus) ProtoMessage()

func (*ConditionedStatus) Reset

func (m *ConditionedStatus) Reset()

func (*ConditionedStatus) SetConditions

func (r *ConditionedStatus) SetConditions(c ...Condition)

SetConditions sets the supplied conditions, replacing any existing conditions of the same type. This is a no-op if all supplied conditions are identical, ignoring the last transition time, to those already set.

func (*ConditionedStatus) Size

func (m *ConditionedStatus) Size() (n int)

func (*ConditionedStatus) String

func (this *ConditionedStatus) String() string

func (*ConditionedStatus) Unmarshal

func (m *ConditionedStatus) Unmarshal(dAtA []byte) error

func (*ConditionedStatus) XXX_DiscardUnknown

func (m *ConditionedStatus) XXX_DiscardUnknown()

func (*ConditionedStatus) XXX_Marshal

func (m *ConditionedStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConditionedStatus) XXX_Merge

func (m *ConditionedStatus) XXX_Merge(src proto.Message)

func (*ConditionedStatus) XXX_Size

func (m *ConditionedStatus) XXX_Size() int

func (*ConditionedStatus) XXX_Unmarshal

func (m *ConditionedStatus) XXX_Unmarshal(b []byte) error

type ReadinessGate

type ReadinessGate struct {
	// ConditionType refers to the condition type whose status is used to determine readiness.
	ConditionType ConditionType `json:"conditionType" protobuf:"bytes,1,opt,name=conditionType"`
}

+k8s:openapi-gen=true ReadinessGate allows for specifying conditions for when a PackageRevision is considered ready.

func (*ReadinessGate) DeepCopy

func (in *ReadinessGate) DeepCopy() *ReadinessGate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReadinessGate.

func (*ReadinessGate) DeepCopyInto

func (in *ReadinessGate) DeepCopyInto(out *ReadinessGate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ReadinessGate) Descriptor

func (*ReadinessGate) Descriptor() ([]byte, []int)

func (ReadinessGate) GetCondition

func (r ReadinessGate) GetCondition() Condition

func (*ReadinessGate) Marshal

func (m *ReadinessGate) Marshal() (dAtA []byte, err error)

func (*ReadinessGate) MarshalTo

func (m *ReadinessGate) MarshalTo(dAtA []byte) (int, error)

func (*ReadinessGate) MarshalToSizedBuffer

func (m *ReadinessGate) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ReadinessGate) ProtoMessage

func (*ReadinessGate) ProtoMessage()

func (*ReadinessGate) Reset

func (m *ReadinessGate) Reset()

func (*ReadinessGate) Size

func (m *ReadinessGate) Size() (n int)

func (*ReadinessGate) String

func (this *ReadinessGate) String() string

func (*ReadinessGate) Unmarshal

func (m *ReadinessGate) Unmarshal(dAtA []byte) error

func (*ReadinessGate) XXX_DiscardUnknown

func (m *ReadinessGate) XXX_DiscardUnknown()

func (*ReadinessGate) XXX_Marshal

func (m *ReadinessGate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReadinessGate) XXX_Merge

func (m *ReadinessGate) XXX_Merge(src proto.Message)

func (*ReadinessGate) XXX_Size

func (m *ReadinessGate) XXX_Size() int

func (*ReadinessGate) XXX_Unmarshal

func (m *ReadinessGate) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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