<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>statemachine :: Chantico</title>
    <link>https://chantico-300062.ci.tno.nl/api/chantico/internal/statemachine/index.html</link>
    <description>package statemachine import &#34;chantico/internal/statemachine&#34; Index type ActionFunction type ActionFunctionType type ActionResult func InitializeFinalizer(ctx context.Context, resource T) *ActionResult func RemoveFinalizer(ctx context.Context, resource T) *ActionResult type Machine func (m *Machine[T]) ExecuteActions(ctx context.Context, kubernetesClient client.Client, resource T, ...) *ActionResult type Reconcilable Types type ActionFunction type ActionFunction[T Reconcilable] struct { Type ActionFunctionType Pure func(context.Context, T) *ActionResult IO func(context.Context, client.Client, T) *ActionResult } ActionFunction represents a single step in the action pipeline for a state. Either Pure or IO must be set (not both), matching the Type field. type ActionFunctionType type ActionFunctionType int ActionFunctionType distinguishes between Pure and IO action functions. const ( ActionFunctionIO ActionFunctionType = iota ActionFunctionPure ) In this context, &#34;Pure&#34; means &#34;does not modify kubernetes cluster resources&#34; type ActionResult type ActionResult struct { *ctrl.Result ph.PatchType } ActionResult carries the reconcile result and what kind of patch to apply. func InitializeFinalizer func InitializeFinalizer[T Reconcilable](ctx context.Context, resource T) *ActionResult InitializeFinalizer is a generic Pure action that adds the resource&#39;s finalizer if it is not already present. func RemoveFinalizer func RemoveFinalizer[T Reconcilable](ctx context.Context, resource T) *ActionResult RemoveFinalizer is a generic Pure action that removes the resource&#39;s finalizer when the resource is being deleted. type Machine type Machine[T Reconcilable] struct { Actions map[string][]ActionFunction[T] FailState string } Machine is a generic state-action machine parameterized over a Reconcilable resource type. It maps states to ordered slices of action functions and knows which state represents failure (to break out of the action loop). func (*Machine[T]) ExecuteActions func (m *Machine[T]) ExecuteActions( ctx context.Context, kubernetesClient client.Client, resource T, patch *ph.PatchHelper, ) *ActionResult ExecuteActions runs the action functions registered for the resource&#39;s current state. After each action that returns a non-nil result, it patches the resource. It breaks early if the resource enters the FailState or if an action returns a non-nil ctrl.Result (indicating requeue). type Reconcilable type Reconcilable interface { client.Object GetState() string SetState(string) GetUpdateGeneration() int64 SetUpdateGeneration(int64) GetFinalizerName() string GetErrorMessage() string SetErrorMessage(string) } Reconcilable is the interface that CRD types must satisfy to be used with the generic state-action machine.</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <copyright>Copyright 2025-2026 TNO. Chantico is licensed under the &lt;a href=&#34;https://www.apache.org/licenses/LICENSE-2.0&#34;&gt;Apache License, Version 2.0&lt;/a&gt;. Published documentation is available under &lt;a href=&#34;https://creativecommons.org/licenses/by-sa/4.0/deed.en&#34;&gt;CC-BY-SA 4.0&lt;/a&gt;.</copyright>
    <atom:link href="https://chantico-300062.ci.tno.nl/api/chantico/internal/statemachine/index.xml" rel="self" type="application/rss+xml" />
  </channel>
</rss>