Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auxiliary ¶
type Auxiliary struct { Ins model.Instance // Type will be used to mark definition label for OAM runtime to get the CRD // It's now required for trait and main workload object. Extra workload CR object will not have the type. Type string // Workload or trait with multiple `outputs` will have a name, if name is empty, than it's the main of this type. Name string }
Auxiliary are objects rendered by definition template. the format for auxiliary resource is always: `outputs.<resourceName>`, it can be auxiliary workload or trait
type AuxiliaryHook ¶
AuxiliaryHook defines function to be invoked before appending auxiliaries to a process.Context
type AuxiliaryHookFn ¶
AuxiliaryHookFn implements AuxiliaryHook interface
type BaseHookFn ¶
BaseHookFn implements BaseHook interface
type Context ¶
type Context interface { SetBase(base model.Instance) error AppendAuxiliaries(auxiliaries ...Auxiliary) error Output() (model.Instance, []Auxiliary) BaseContextFile() (string, error) BaseContextLabels() map[string]string SetParameters(params map[string]interface{}) PushData(key string, data interface{}) RemoveData(key string) GetData(key string) interface{} GetCtx() context.Context SetCtx(context.Context) }
Context defines Rendering Context Interface
func NewContext ¶
func NewContext(data ContextData) Context
NewContext create render templateContext
type ContextData ¶
type ContextData struct { Name string Namespace string StepName string WorkflowName string PublishVersion string Ctx context.Context CustomData map[string]interface{} Data map[string]interface{} BaseHooks []BaseHook AuxiliaryHooks []AuxiliaryHook }
ContextData is the core data of process context
type DataManager ¶ added in v0.6.0
type DataManager interface { Fill(ctx Context, kvs []StepMetaKV) Remove(ctx Context, keys []string) }
DataManager is in charge of injecting and removing runtime context for ContextData
func NewStepRunTimeMeta ¶ added in v0.6.0
func NewStepRunTimeMeta() DataManager
NewStepRunTimeMeta create step runtime metadata manager
type RequiredSecrets ¶
type RequiredSecrets struct { Namespace string Name string ContextName string Data map[string]interface{} }
RequiredSecrets is used to store all secret names which are generated by cloud resource components and required by current component
type StepMetaKV ¶ added in v0.6.0
type StepMetaKV struct { Key string Value interface{} }
StepMetaKV store the key and value of step runtime metadata
func WithGroupName ¶ added in v0.6.0
func WithGroupName(name string) StepMetaKV
WithGroupName return stepGroupName of the step
func WithName ¶ added in v0.6.0
func WithName(name string) StepMetaKV
WithName return stepName of the step
func WithSessionID ¶ added in v0.6.0
func WithSessionID(id string) StepMetaKV
WithSessionID return stepSessionID of the step
func WithSpanID ¶ added in v0.6.0
func WithSpanID(id string) StepMetaKV
WithSpanID return spanID of the step
type StepRunTimeMeta ¶ added in v0.6.0
type StepRunTimeMeta struct{}
StepRunTimeMeta manage step runtime metadata
func (*StepRunTimeMeta) Fill ¶ added in v0.6.0
func (s *StepRunTimeMeta) Fill(ctx Context, kvs []StepMetaKV)
Fill will fill step runtime metadata for ContextData
func (*StepRunTimeMeta) Remove ¶ added in v0.6.0
func (s *StepRunTimeMeta) Remove(ctx Context, keys []string)
Remove remove step runtime metadata of ContextData