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 ExtendedContextFile() string BaseContextLabels() map[string]string SetParameters(params map[string]interface{}) PushData(key string, data 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 ¶ added in v1.2.5
type ContextData struct { Namespace string AppName string CompName string AppRevisionName string WorkflowName string PublishVersion string Ctx context.Context BaseHooks []BaseHook AuxiliaryHooks []AuxiliaryHook Components []common.ApplicationComponent AppLabels map[string]string AppAnnotations map[string]string }
ContextData is the core data of process context
Click to show internal directories.
Click to hide internal directories.