NewContextFromClientSet returns new Context.
(wftmplClientset typed.WorkflowTemplateInterface, clusterWftmplClient typed.ClusterWorkflowTemplateInterface, tmplBase wfv1.TemplateHolder, workflow *wfv1.Workflow, log logging.Logger)
| 96 | |
| 97 | // NewContextFromClientSet returns new Context. |
| 98 | func NewContextFromClientSet(wftmplClientset typed.WorkflowTemplateInterface, clusterWftmplClient typed.ClusterWorkflowTemplateInterface, tmplBase wfv1.TemplateHolder, workflow *wfv1.Workflow, log logging.Logger) *TemplateContext { |
| 99 | return &TemplateContext{ |
| 100 | wftmplGetter: WrapWorkflowTemplateInterface(wftmplClientset), |
| 101 | cwftmplGetter: WrapClusterWorkflowTemplateInterface(clusterWftmplClient), |
| 102 | tmplBase: tmplBase, |
| 103 | workflow: workflow, |
| 104 | log: log, |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | // GetTemplateByName returns a template by name in the context. |
| 109 | func (tplCtx *TemplateContext) GetTemplateByName(ctx context.Context, name string) (*wfv1.Template, error) { |