v1alpha1

package
v0.0.0-...-45726f7 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

+k8s:deepcopy-gen=package +groupName=flows.knative.dev

Index

Constants

View Source
const (
	StateMachineRunnerConditionReady                    = apis.ConditionReady
	StateMachineRunnerAddressable    apis.ConditionType = "Addressable"
)
View Source
const (
	StateMachineConditionReady = apis.ConditionReady
)

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: statev1.GroupName, Version: "v1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func RegisterAlternateStateMachineConditionSet

func RegisterAlternateStateMachineConditionSet(conditionSet apis.ConditionSet)

RegisterAlternateStateMachineConditionSet register a apis.ConditionSet for the given statemachine class.

func RegisterAlternateStateMachineRunnerConditionSet

func RegisterAlternateStateMachineRunnerConditionSet(conditionSet apis.ConditionSet)

RegisterAlternateStateMachineRunnerConditionSet register a apis.ConditionSet for the given broker class.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type EventType

type EventType string

EventType represents an extensible event type in the state machine.

type Events

type Events map[EventType]StateType

Events represents a mapping of events and states.

type State

type State struct {
	Events Events `json:"events,omitempty"`
}

State binds a state with an action and a set of events it can handle.

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 StateMachine API

func (*StateMachine) GetConditionSet

func (sm *StateMachine) GetConditionSet() apis.ConditionSet

GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.

func (*StateMachine) GetGroupVersionKind

func (t *StateMachine) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind returns GroupVersionKind for StateMachines

func (*StateMachine) GetStatus

func (t *StateMachine) GetStatus() *duckv1.Status

GetStatus retrieves the status of the StateMachine. Implements the KRShaped interface.

func (*StateMachine) SetDefaults

func (sm *StateMachine) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable

func (*StateMachine) Validate

func (sm *StateMachine) Validate(ctx context.Context) *apis.FieldError

Validate implements apis.Validatable

type StateMachineDefinition

type StateMachineDefinition struct {
	Version            string             `json:"version,omitempty"`
	StateMachineStates StateMachineStates `json:"stateMachineStates"`
}

@TODO: delete from here This comes from StateMachineRunner

type StateMachineList

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

StateMachineList contains a list of StateMachine

type StateMachineRunner

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

	Spec   StateMachineRunnerSpec   `json:"spec,omitempty"`
	Status StateMachineRunnerStatus `json:"status,omitempty"`
}

StateMachineRunner is the Schema for the statemachinerunners API

func (*StateMachineRunner) GetConditionSet

func (smr *StateMachineRunner) GetConditionSet() apis.ConditionSet

GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.

func (*StateMachineRunner) GetGroupVersionKind

func (t *StateMachineRunner) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind returns GroupVersionKind for StateMachines

func (*StateMachineRunner) GetStatus

func (t *StateMachineRunner) GetStatus() *duckv1.Status

GetStatus retrieves the status of the StateMachine. Implements the KRShaped interface.

func (*StateMachineRunner) SetDefaults

func (smr *StateMachineRunner) SetDefaults(ctx context.Context)

SetDefaults implements apis.Defaultable

func (*StateMachineRunner) Validate

func (smr *StateMachineRunner) Validate(ctx context.Context) *apis.FieldError

Validate implements apis.Validatable

type StateMachineRunnerList

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

StateMachineRunnerList contains a list of StateMachineRunner

type StateMachineRunnerSpec

type StateMachineRunnerSpec struct {
	StateMachineRef string `json:"stateMachineRef,omitempty"`

	Broker string `json:"broker,omitempty"`

	Sink string `json:"sink,omitempty"`

	RedisHost string `json:"redisHost,omitempty"`
}

StateMachineRunnerSpec defines the desired state of WorkflowRunner

func (*StateMachineRunnerSpec) Validate

func (smrs *StateMachineRunnerSpec) Validate(ctx context.Context) *apis.FieldError

Validate implements apis.Validatable

type StateMachineRunnerStatus

type StateMachineRunnerStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	RunnerUrl string `json:"runnerUrl,omitempty"`

	RunnerId string `json:"runnerId,omitempty"`

	BrokerUrl string `json:"brokerUrl,omitempty"`

	// inherits duck/v1 Status, which currently provides:
	// * ObservedGeneration - the 'Generation' of the StateMachineRunner that was last processed by the controller.
	// * Conditions - the latest available observations of a resource's current state.
	duckv1.Status `json:",inline"`
}

StateMachineRunnerStatus defines the observed state of WorkflowRunner

func (*StateMachineRunnerStatus) GetCondition

func (smrs *StateMachineRunnerStatus) GetCondition(t apis.ConditionType) *apis.Condition

GetCondition returns the condition currently associated with the given type, or nil.

func (*StateMachineRunnerStatus) GetConditionSet

func (smrs *StateMachineRunnerStatus) GetConditionSet() apis.ConditionSet

GetConditionSet retrieves the condition set for this resource.

func (*StateMachineRunnerStatus) GetTopLevelCondition

func (smrs *StateMachineRunnerStatus) GetTopLevelCondition() *apis.Condition

GetTopLevelCondition returns the top level Condition.

func (*StateMachineRunnerStatus) InitializeConditions

func (smrs *StateMachineRunnerStatus) InitializeConditions()

InitializeConditions sets relevant unset conditions to Unknown state.

func (*StateMachineRunnerStatus) IsReady

func (smrs *StateMachineRunnerStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*StateMachineRunnerStatus) SetAddress

func (smrs *StateMachineRunnerStatus) SetAddress(url *apis.URL)

SetAddress makes this Broker addressable by setting the URI. It also sets the BrokerConditionAddressable to true.

type StateMachineSpec

type StateMachineSpec struct {
	StateMachineDefinition StateMachineDefinition `json:"stateMachine,omitempty"`
}

StateMachineSpec defines the desired state of StateMachine

func (*StateMachineSpec) Validate

func (sms *StateMachineSpec) Validate(ctx context.Context) *apis.FieldError

Validate implements apis.Validatable

type StateMachineStates

type StateMachineStates struct {
	States States `json:"states"`
}

type StateMachineStatus

type StateMachineStatus struct {
	// inherits duck/v1 Status, which currently provides:
	// * ObservedGeneration - the 'Generation' of the StateMachine that was last processed by the controller.
	// * Conditions - the latest available observations of a resource's current state.
	duckv1.Status `json:",inline"`
}

StateMachineStatus defines the observed state of Workflow

func (*StateMachineStatus) GetCondition

func (sms *StateMachineStatus) GetCondition(t apis.ConditionType) *apis.Condition

GetCondition returns the condition currently associated with the given type, or nil.

func (*StateMachineStatus) GetConditionSet

func (sms *StateMachineStatus) GetConditionSet() apis.ConditionSet

GetConditionSet retrieves the condition set for this resource.

func (*StateMachineStatus) GetTopLevelCondition

func (sms *StateMachineStatus) GetTopLevelCondition() *apis.Condition

GetTopLevelCondition returns the top level Condition.

func (*StateMachineStatus) InitializeConditions

func (sms *StateMachineStatus) InitializeConditions()

InitializeConditions sets relevant unset conditions to Unknown state.

func (*StateMachineStatus) IsReady

func (sms *StateMachineStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*StateMachineStatus) SetAddress

func (sms *StateMachineStatus) SetAddress(url *apis.URL)

SetAddress makes this Broker addressable by setting the URI. It also sets the BrokerConditionAddressable to true.

type StateType

type StateType string

StateType represents an extensible state type in the state machine.

type States

type States map[StateType]State

States represents a mapping of states and their implementations.

Jump to

Keyboard shortcuts

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