binding

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Name

func Name(storyRunName, stepName string) string

Name returns the deterministic name for the TransportBinding associated with a given StoryRun step. Names are kept DNS-safe and stable using the shared kubeutil.ComposeName helper.

func PatchReadyCondition

func PatchReadyCondition(
	ctx context.Context,
	c client.Client,
	binding *transportv1alpha1.TransportBinding,
	ready bool,
	reason,
	message string,
) error

PatchReadyCondition ensures the TransportBinding Ready condition matches the supplied ready/reason/message tuple using kubeutil.RetryableStatusPatch so controllers and background workers can keep condition semantics aligned.

Arguments:

  • ctx context.Context: propagated to the patch call.
  • c client.Client: Kubernetes client used to submit the status kubeutil.
  • binding *transportv1alpha1.TransportBinding: supplies the binding name/namespace.
  • ready bool: desired Ready condition status.
  • reason string / message string: Ready condition metadata.

Returns:

  • error: result of the status kubeutil.

func ReadyState

func ReadyState(binding *transportv1alpha1.TransportBinding) (bool, bool, string)

ReadyState inspects a TransportBinding's Ready condition and reports whether the binding is ready, if the current state is terminal, and the associated status message. Callers can reuse the shared interpretation across controllers so user-facing diagnostics remain consistent.

Arguments:

  • binding *transportv1alpha1.TransportBinding: binding whose status should be interpreted.

Returns:

  • ready bool: true when ConditionReady is true.
  • terminal bool: true when the Ready condition reason indicates a non-recoverable failure.
  • message string: trimmed status or reason text suitable for logs/events/conditions.

func StoryScopedName

func StoryScopedName(storyName, stepName string) string

StoryScopedName returns the deterministic name for a TransportBinding that is shared across all StoryRuns for a given Story/step pair.

Types

This section is empty.

Jump to

Keyboard shortcuts

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