componentdefinition

package
v1.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2024 License: LGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

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

func NewComponentDefinitionBuilder(namespace string) *Builder

NewComponentDefinitionBuilder -

func (*Builder) BuildWorkloadResource

func (c *Builder) BuildWorkloadResource(as *v1.AppService, dbm db.Manager) error

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.

func (*Builder) OnAdd

func (c *Builder) OnAdd(obj interface{})

OnAdd -

func (*Builder) OnDelete

func (c *Builder) OnDelete(obj interface{})

OnDelete -

func (*Builder) OnUpdate

func (c *Builder) OnUpdate(oldObj, newObj interface{})

OnUpdate -

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL