Documentation ¶
Index ¶
- Constants
- type ComponentManifest
- type Context
- type WorkflowContext
- func (wf *WorkflowContext) Commit() error
- func (wf *WorkflowContext) GetComponent(name string) (*ComponentManifest, error)
- func (wf *WorkflowContext) GetComponents() map[string]*ComponentManifest
- func (wf *WorkflowContext) GetVar(paths ...string) (*value.Value, error)
- func (wf *WorkflowContext) LoadFromConfigMap(cm corev1.ConfigMap) error
- func (wf *WorkflowContext) MakeParameter(parameter interface{}) (*value.Value, error)
- func (wf *WorkflowContext) PatchComponent(name string, patchValue *value.Value) error
- func (wf *WorkflowContext) SetVar(v *value.Value, paths ...string) error
- func (wf *WorkflowContext) StoreRef() *corev1.ObjectReference
Constants ¶
const ( // ConfigMapKeyComponents is the key in ConfigMap Data field for containing data of components ConfigMapKeyComponents = "components" // ConfigMapKeyVars is the key in ConfigMap Data field for containing data of variable ConfigMapKeyVars = "vars" // AnnotationStartTimestamp is the annotation key of the workflow start timestamp AnnotationStartTimestamp = "vela.io/startTime" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComponentManifest ¶
ComponentManifest contains resources rendered from an application component.
type Context ¶
type Context interface { GetComponent(name string) (*ComponentManifest, error) GetComponents() map[string]*ComponentManifest PatchComponent(name string, patchValue *value.Value) error GetVar(paths ...string) (*value.Value, error) SetVar(v *value.Value, paths ...string) error Commit() error MakeParameter(parameter interface{}) (*value.Value, error) StoreRef() *corev1.ObjectReference }
Context is workflow context interface
func LoadContext ¶
LoadContext load workflow context from store.
type WorkflowContext ¶
type WorkflowContext struct {
// contains filtered or unexported fields
}
WorkflowContext is workflow context.
func (*WorkflowContext) Commit ¶
func (wf *WorkflowContext) Commit() error
Commit the workflow context and persist it's content.
func (*WorkflowContext) GetComponent ¶
func (wf *WorkflowContext) GetComponent(name string) (*ComponentManifest, error)
GetComponent Get ComponentManifest from workflow context.
func (*WorkflowContext) GetComponents ¶
func (wf *WorkflowContext) GetComponents() map[string]*ComponentManifest
GetComponents Get All ComponentManifest from workflow context.
func (*WorkflowContext) GetVar ¶
func (wf *WorkflowContext) GetVar(paths ...string) (*value.Value, error)
GetVar get variable from workflow context.
func (*WorkflowContext) LoadFromConfigMap ¶
func (wf *WorkflowContext) LoadFromConfigMap(cm corev1.ConfigMap) error
LoadFromConfigMap recover workflow context from configMap.
func (*WorkflowContext) MakeParameter ¶
func (wf *WorkflowContext) MakeParameter(parameter interface{}) (*value.Value, error)
MakeParameter make 'value' with interface{}
func (*WorkflowContext) PatchComponent ¶
func (wf *WorkflowContext) PatchComponent(name string, patchValue *value.Value) error
PatchComponent patch component with value.
func (*WorkflowContext) SetVar ¶
func (wf *WorkflowContext) SetVar(v *value.Value, paths ...string) error
SetVar set variable to workflow context.
func (*WorkflowContext) StoreRef ¶
func (wf *WorkflowContext) StoreRef() *corev1.ObjectReference
StoreRef return the store reference of workflow context.