Documentation ¶
Index ¶
- Constants
- Variables
- type Builder
- func (c *Builder) BuildWorkloadResource(as *v1.AppService, dbm db.Manager) error
- func (c *Builder) GetComponentDefinition(name string) *v1alpha1.ComponentDefinition
- func (c *Builder) GetComponentProperties(as *v1.AppService, dbm db.Manager, cd *v1alpha1.ComponentDefinition) interface{}
- func (c *Builder) InitCoreComponentDefinition(wutongClient wutongversioned.Interface)
- func (c *Builder) OnAdd(obj interface{})
- func (c *Builder) OnDelete(obj interface{})
- func (c *Builder) OnUpdate(oldObj, newObj interface{})
- type TemplateContext
- type ThirdComponentKubernetes
- type ThirdComponentPort
- type ThirdComponentProperties
Constants ¶
View Source
const ( // ParameterTag is the keyword in CUE template to define users' input ParameterTag = "parameter" // OutputFieldName is the reference of context base object OutputFieldName = "output" // OutputsFieldName is the reference of context Auxiliaries OutputsFieldName = "outputs" // ConfigFieldName is the reference of context config ConfigFieldName = "config" // ContextName is the name of context ContextName = "name" // ContextAppName is the appName of context ContextAppName = "appName" // ContextID is the componentID of context ContextID = "componentID" // ContextAppID is the appID of context ContextAppID = "appID" // ContextNamespace is the namespace of the app ContextNamespace = "namespace" )
Variables ¶
View Source
var ErrNotSupport = fmt.Errorf("not support component definition")
ErrNotSupport -
View Source
var ErrOnlyCUESupport = fmt.Errorf("component definition only support cue template")
ErrOnlyCUESupport -
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder -
func GetComponentDefinitionBuilder ¶
func GetComponentDefinitionBuilder() *Builder
GetComponentDefinitionBuilder -
func NewComponentDefinitionBuilder ¶
NewComponentDefinitionBuilder -
func (*Builder) BuildWorkloadResource ¶
BuildWorkloadResource -
func (*Builder) GetComponentDefinition ¶
func (c *Builder) GetComponentDefinition(name string) *v1alpha1.ComponentDefinition
GetComponentDefinition -
func (*Builder) GetComponentProperties ¶
func (c *Builder) GetComponentProperties(as *v1.AppService, dbm db.Manager, cd *v1alpha1.ComponentDefinition) interface{}
GetComponentProperties -
func (*Builder) InitCoreComponentDefinition ¶
func (c *Builder) InitCoreComponentDefinition(wutongClient wutongversioned.Interface)
InitCoreComponentDefinition init the built-in component type definition. Should be called after the store is initialized.
type TemplateContext ¶
type TemplateContext struct {
// contains filtered or unexported fields
}
func NewTemplateContext ¶
func NewTemplateContext(as *v1.AppService, template string, params interface{}) *TemplateContext
func (*TemplateContext) ExtendedContextFile ¶
func (c *TemplateContext) ExtendedContextFile() string
func (*TemplateContext) GenerateComponentManifests ¶
func (c *TemplateContext) GenerateComponentManifests() ([]*unstructured.Unstructured, error)
func (*TemplateContext) SetContextValue ¶
func (c *TemplateContext) SetContextValue(manifests []*unstructured.Unstructured)
type ThirdComponentKubernetes ¶
type ThirdComponentKubernetes struct { Name string `json:"name"` Namespace string `json:"namespace"` }
ThirdComponentKubernetes -
type ThirdComponentPort ¶
type ThirdComponentPort struct { Name string `json:"name"` Port int `json:"port"` OpenInner bool `json:"openInner"` OpenOuter bool `json:"openOuter"` }
ThirdComponentPort -
type ThirdComponentProperties ¶
type ThirdComponentProperties struct { Kubernetes *ThirdComponentKubernetes `json:"kubernetes,omitempty"` Endpoints []*v1alpha1.ThirdComponentEndpoint `json:"endpoints,omitempty"` Port []*ThirdComponentPort `json:"port"` Probe *v1alpha1.Probe `json:"probe,omitempty"` }
ThirdComponentProperties third component properties
Click to show internal directories.
Click to hide internal directories.