component

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2017 License: Apache-2.0 Imports: 7 Imported by: 12

Documentation

Overview

Package component defines all component-specific actions, which get generated by the policy diff when component changes occur for specific component instances. Component-specific action is supposed to handle a certain change for a given component instance (e.g. create, update, delete, attach dependency, remove dependency, etc).

Index

Constants

This section is empty.

Variables

View Source
var AttachDependencyActionObject = &runtime.Info{
	Kind:        "action-component-dependency-attach",
	Constructor: func() runtime.Object { return &AttachDependencyAction{} },
}

AttachDependencyActionObject is an informational data structure with Kind and Constructor for the action

View Source
var CreateActionObject = &runtime.Info{
	Kind:        "action-component-create",
	Constructor: func() runtime.Object { return &CreateAction{} },
}

CreateActionObject is an informational data structure with Kind and Constructor for the action

View Source
var DeleteActionObject = &runtime.Info{
	Kind:        "action-component-delete",
	Constructor: func() runtime.Object { return &DeleteAction{} },
}

DeleteActionObject is an informational data structure with Kind and Constructor for the action

View Source
var DetachDependencyActionObject = &runtime.Info{
	Kind:        "action-component-dependency-detach",
	Constructor: func() runtime.Object { return &DetachDependencyAction{} },
}

DetachDependencyActionObject is an informational data structure with Kind and Constructor for the action

View Source
var EndpointsActionObject = &runtime.Info{
	Kind:        "action-component-endpoints",
	Constructor: func() runtime.Object { return &EndpointsAction{} },
}

EndpointsActionObject is an informational data structure with Kind and Constructor for the action

View Source
var UpdateActionObject = &runtime.Info{
	Kind:        "action-component-update",
	Constructor: func() runtime.Object { return &DeleteAction{} },
}

UpdateActionObject is an informational data structure with Kind and Constructor for the action

Functions

This section is empty.

Types

type AttachDependencyAction

type AttachDependencyAction struct {
	runtime.TypeKind `yaml:",inline"`
	*action.Metadata
	ComponentKey string
	DependencyID string
}

AttachDependencyAction is a action which gets called when a consumer is added to an existing component

func NewAttachDependencyAction

func NewAttachDependencyAction(componentKey string, dependencyID string) *AttachDependencyAction

NewAttachDependencyAction creates new AttachDependencyAction

func (*AttachDependencyAction) Apply

func (a *AttachDependencyAction) Apply(context *action.Context) error

Apply applies the action

type CreateAction

type CreateAction struct {
	runtime.TypeKind `yaml:",inline"`
	*action.Metadata
	ComponentKey string
}

CreateAction is a action which gets called when a new component needs to be instantiated (i.e. new instance of code to be deployed to the cloud)

func NewCreateAction

func NewCreateAction(componentKey string) *CreateAction

NewCreateAction creates new CreateAction

func (*CreateAction) Apply

func (a *CreateAction) Apply(context *action.Context) error

Apply applies the action

type DeleteAction

type DeleteAction struct {
	runtime.TypeKind `yaml:",inline"`
	*action.Metadata
	ComponentKey string
}

DeleteAction is a action which gets called when an existing component needs to be destroyed (i.e. existing instance of code needs to be terminated in the cloud)

func NewDeleteAction

func NewDeleteAction(componentKey string) *DeleteAction

NewDeleteAction creates new DeleteAction

func (*DeleteAction) Apply

func (a *DeleteAction) Apply(context *action.Context) error

Apply applies the action

type DetachDependencyAction

type DetachDependencyAction struct {
	runtime.TypeKind `yaml:",inline"`
	*action.Metadata
	ComponentKey string
	DependencyID string
}

DetachDependencyAction is a action which gets called when a consumer is removed from an existing component

func NewDetachDependencyAction

func NewDetachDependencyAction(componentKey string, dependencyID string) *DetachDependencyAction

NewDetachDependencyAction creates new DetachDependencyAction

func (*DetachDependencyAction) Apply

func (a *DetachDependencyAction) Apply(context *action.Context) error

Apply applies the action

type EndpointsAction

type EndpointsAction struct {
	runtime.TypeKind `yaml:",inline"`
	*action.Metadata
	ComponentKey string
}

EndpointsAction is a action which gets called when a new component changed (created or updated) and endpoints should be updated

func NewEndpointsAction

func NewEndpointsAction(componentKey string) *EndpointsAction

NewEndpointsAction creates new EndpointsAction

func (*EndpointsAction) Apply

func (a *EndpointsAction) Apply(context *action.Context) error

Apply applies the action

type UpdateAction

type UpdateAction struct {
	runtime.TypeKind `yaml:",inline"`
	*action.Metadata
	ComponentKey string
}

UpdateAction is a action which gets called when an existing component needs to be updated (i.e. parameters of a running code instance need to be changed in the cloud)

func NewUpdateAction

func NewUpdateAction(componentKey string) *UpdateAction

NewUpdateAction creates new UpdateAction

func (*UpdateAction) Apply

func (a *UpdateAction) Apply(context *action.Context) error

Apply applies the action

Jump to

Keyboard shortcuts

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