templateresolution

package
v4.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterWorkflowTemplateGetter

type ClusterWorkflowTemplateGetter interface {
	// Get retrieves the WorkflowTemplate from the indexer for a given name.
	Get(ctx context.Context, name string) (*wfv1.ClusterWorkflowTemplate, error)
}

ClusterWorkflowTemplateGetter helps get WorkflowTemplates.

func WrapClusterWorkflowTemplateInterface

func WrapClusterWorkflowTemplateInterface(clusterClientset typed.ClusterWorkflowTemplateInterface) ClusterWorkflowTemplateGetter

type NullClusterWorkflowTemplateGetter

type NullClusterWorkflowTemplateGetter struct{}

func (*NullClusterWorkflowTemplateGetter) Get

type NullWorkflowTemplateNamespacedGetter

type NullWorkflowTemplateNamespacedGetter struct{}

func (*NullWorkflowTemplateNamespacedGetter) Get

type TemplateContext

type TemplateContext struct {
	// contains filtered or unexported fields
}

TemplateContext is a context of template search.

func NewContext

func NewContext(wftmplGetter WorkflowTemplateNamespacedGetter, cwftmplGetter ClusterWorkflowTemplateGetter, tmplBase wfv1.TemplateHolder, workflow *wfv1.Workflow, log logging.Logger) *TemplateContext

NewContext returns new Context.

func NewContextFromClientSet

func NewContextFromClientSet(wftmplClientset typed.WorkflowTemplateInterface, clusterWftmplClient typed.ClusterWorkflowTemplateInterface, tmplBase wfv1.TemplateHolder, workflow *wfv1.Workflow, log logging.Logger) *TemplateContext

NewContextFromClientSet returns new Context.

func (*TemplateContext) GetCurrentTemplateBase

func (tplCtx *TemplateContext) GetCurrentTemplateBase() wfv1.TemplateHolder

GetCurrentTemplateBase returns the current template base of the context.

func (*TemplateContext) GetTemplate

GetTemplate returns a template found by template name or template ref.

func (*TemplateContext) GetTemplateByName

func (tplCtx *TemplateContext) GetTemplateByName(ctx context.Context, name string) (*wfv1.Template, error)

GetTemplateByName returns a template by name in the context.

func (*TemplateContext) GetTemplateFromRef

func (tplCtx *TemplateContext) GetTemplateFromRef(ctx context.Context, tmplRef *wfv1.TemplateRef) (*wfv1.Template, error)

GetTemplateFromRef returns a template found by a given template ref.

func (*TemplateContext) GetTemplateGetterFromRef

func (tplCtx *TemplateContext) GetTemplateGetterFromRef(ctx context.Context, tmplRef *wfv1.TemplateRef) (wfv1.TemplateHolder, error)

func (*TemplateContext) GetTemplateScope

func (tplCtx *TemplateContext) GetTemplateScope() string

func (*TemplateContext) ResolveTemplate

func (tplCtx *TemplateContext) ResolveTemplate(c context.Context, tmplHolder wfv1.TemplateReferenceHolder) (*TemplateContext, *wfv1.Template, bool, error)

ResolveTemplate digs into referenes and returns a merged template. This method is the public start point of template resolution.

func (*TemplateContext) WithClusterWorkflowTemplate

func (tplCtx *TemplateContext) WithClusterWorkflowTemplate(ctx context.Context, name string) (*TemplateContext, error)

WithClusterWorkflowTemplate creates new context with a wfv1.TemplateHolder.

func (*TemplateContext) WithTemplateBase

func (tplCtx *TemplateContext) WithTemplateBase(tmplBase wfv1.TemplateHolder) *TemplateContext

WithTemplateBase creates new context with a wfv1.TemplateHolder.

func (*TemplateContext) WithTemplateHolder

func (tplCtx *TemplateContext) WithTemplateHolder(ctx context.Context, tmplHolder wfv1.TemplateReferenceHolder) (*TemplateContext, error)

WithTemplateHolder creates new context with a template base of a given template holder.

func (*TemplateContext) WithWorkflowTemplate

func (tplCtx *TemplateContext) WithWorkflowTemplate(ctx context.Context, name string) (*TemplateContext, error)

WithWorkflowTemplate creates new context with a wfv1.TemplateHolder.

type WorkflowTemplateNamespacedGetter

type WorkflowTemplateNamespacedGetter interface {
	// Get retrieves the WorkflowTemplate from the indexer for a given name.
	Get(ctx context.Context, name string) (*wfv1.WorkflowTemplate, error)
}

WorkflowTemplateNamespacedGetter helps get WorkflowTemplates.

Jump to

Keyboard shortcuts

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