v1

package
v0.0.0-...-ba840aa 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: 5 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the kube.tessa.io v1 API group +kubebuilder:object:generate=true +groupName=kube.tessa.io.kube.state.machine

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "kube.tessa.io.kube.state.machine", Version: "v1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Choice

type Choice struct {
	Name      string    `json:"name"`
	Condition Condition `json:"condition"`
	Next      string    `json:"next"`
}

State defines the single state of a state machine

func (*Choice) DeepCopy

func (in *Choice) DeepCopy() *Choice

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

func (*Choice) DeepCopyInto

func (in *Choice) DeepCopyInto(out *Choice)

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

type Condition

type Condition struct {
	PodName string `json:"podName"`
	Status  string `json:"status"`
}

State defines the single state of a state machine

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.

type State

type State struct {
	Name    string          `json:"name"`
	Type    StateType       `json:"type"`
	Choices *[]Choice       `json:"choices,omitempty"`
	Task    *corev1.PodSpec `json:"task,omitempty"`
	WaitFor *string         `json:"waitFor,omitempty"`
	End     *bool           `json:"end,omitempty"`
	Next    *string         `json:"next,omitempty"`
}

State defines the single state of a state machine

func (*State) DeepCopy

func (in *State) DeepCopy() *State

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

func (*State) DeepCopyInto

func (in *State) DeepCopyInto(out *State)

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

type StateMachine

type StateMachine struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   StateMachineSpec   `json:"spec,omitempty"`
	Status StateMachineStatus `json:"status,omitempty"`
}

StateMachine is the Schema for the statemachines API

func (*StateMachine) DeepCopy

func (in *StateMachine) DeepCopy() *StateMachine

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

func (*StateMachine) DeepCopyInto

func (in *StateMachine) DeepCopyInto(out *StateMachine)

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

func (*StateMachine) DeepCopyObject

func (in *StateMachine) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type StateMachineList

type StateMachineList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []StateMachine `json:"items"`
}

StateMachineList contains a list of StateMachine

func (*StateMachineList) DeepCopy

func (in *StateMachineList) DeepCopy() *StateMachineList

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

func (*StateMachineList) DeepCopyInto

func (in *StateMachineList) DeepCopyInto(out *StateMachineList)

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

func (*StateMachineList) DeepCopyObject

func (in *StateMachineList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type StateMachineSpec

type StateMachineSpec struct {
	States []State `json:"states,omitempty"`
}

StateMachineSpec defines the desired state of StateMachine

func (*StateMachineSpec) DeepCopy

func (in *StateMachineSpec) DeepCopy() *StateMachineSpec

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

func (*StateMachineSpec) DeepCopyInto

func (in *StateMachineSpec) DeepCopyInto(out *StateMachineSpec)

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

type StateMachineStatus

type StateMachineStatus struct{}

StateMachineStatus defines the observed state of StateMachine

func (*StateMachineStatus) DeepCopy

func (in *StateMachineStatus) DeepCopy() *StateMachineStatus

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

func (*StateMachineStatus) DeepCopyInto

func (in *StateMachineStatus) DeepCopyInto(out *StateMachineStatus)

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

type StateType

type StateType string

StateType defines the type of a given state

const (
	// StateTypeChoice is a state that can have multiple possible outcomes
	StateTypeChoice StateType = "Choice"
	// StateTypePass is a state that does nothing
	StateTypePass StateType = "Pass"
	// StateTypeWait is a state that waits for a specified time, or a valid condition
	StateTypeWait StateType = "Wait"
	// StateTypeSucceed is a state that terminates a state machine successfully
	StateTypeSucceed StateType = "Succeed"
	// StateTypeFail is a state that terminates a state machine with a failure
	StateTypeFail StateType = "Fail"
	// StateTypeParallel is a state that can have multiple branches of execution
	StateTypeParallel StateType = "Parallel"
	// StateTypeTask is a state that can be used to deploy a given workload
	StateTypeTask StateType = "Task"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳