workflowplane

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWorkflowPlaneNil           = errors.New("workflow plane is nil")
	ErrWorkflowPlaneNotFound      = errors.New("workflow plane not found")
	ErrWorkflowPlaneAlreadyExists = errors.New("workflow plane already exists")
)

Functions

This section is empty.

Types

type Service

type Service interface {
	ListWorkflowPlanes(ctx context.Context, namespaceName string, opts services.ListOptions) (*services.ListResult[openchoreov1alpha1.WorkflowPlane], error)
	GetWorkflowPlane(ctx context.Context, namespaceName, workflowPlaneName string) (*openchoreov1alpha1.WorkflowPlane, error)
	CreateWorkflowPlane(ctx context.Context, namespaceName string, wp *openchoreov1alpha1.WorkflowPlane) (*openchoreov1alpha1.WorkflowPlane, error)
	UpdateWorkflowPlane(ctx context.Context, namespaceName string, wp *openchoreov1alpha1.WorkflowPlane) (*openchoreov1alpha1.WorkflowPlane, error)
	DeleteWorkflowPlane(ctx context.Context, namespaceName, workflowPlaneName string) error

	// GetWorkflowPlaneClient creates a Kubernetes client for the workflow plane cluster.
	// Used by internal services for cross-cluster operations.
	GetWorkflowPlaneClient(ctx context.Context, namespaceName string) (client.Client, error)

	// ArgoWorkflowExists checks whether the Argo Workflow referenced by runReference
	// still exists on the workflow plane. Used by internal services.
	ArgoWorkflowExists(ctx context.Context, namespaceName string, runReference *openchoreov1alpha1.ResourceReference) bool
}

Service defines the workflow plane service interface. Both the core service (no authz) and the authz-wrapped service implement this. Methods accept and return Kubernetes CRD types directly for alignment with the K8s-native API design.

func NewService

func NewService(k8sClient client.Client, planeClientProvider kubernetesClient.WorkflowPlaneClientProvider, logger *slog.Logger) Service

NewService creates a new workflow plane service without authorization.

func NewServiceWithAuthz

func NewServiceWithAuthz(k8sClient client.Client, authzPDP authz.PDP, logger *slog.Logger) Service

NewServiceWithAuthz creates a workflow plane service with authorization checks.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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