component

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: May 30, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

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

func (*AttachDependencyAction) DescribeChanges added in v0.1.14

func (a *AttachDependencyAction) DescribeChanges() util.NestedParameterMap

DescribeChanges returns text-based description of changes that will be applied

type CreateAction

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

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, params util.NestedParameterMap) *CreateAction

NewCreateAction creates new CreateAction

func (*CreateAction) Apply

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

Apply applies the action

func (*CreateAction) DescribeChanges added in v0.1.14

func (a *CreateAction) DescribeChanges() util.NestedParameterMap

DescribeChanges returns text-based description of changes that will be applied

type DeleteAction

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

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, params util.NestedParameterMap) *DeleteAction

NewDeleteAction creates new DeleteAction

func (*DeleteAction) Apply

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

Apply applies the action

func (*DeleteAction) DescribeChanges added in v0.1.14

func (a *DeleteAction) DescribeChanges() util.NestedParameterMap

DescribeChanges returns text-based description of changes that will be applied

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

func (*DetachDependencyAction) DescribeChanges added in v0.1.14

func (a *DetachDependencyAction) DescribeChanges() util.NestedParameterMap

DescribeChanges returns text-based description of changes that will be applied

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

func (*EndpointsAction) DescribeChanges added in v0.1.14

func (a *EndpointsAction) DescribeChanges() util.NestedParameterMap

DescribeChanges returns text-based description of changes that will be applied

type UpdateAction

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

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, paramsBefore util.NestedParameterMap, params util.NestedParameterMap) *UpdateAction

NewUpdateAction creates new UpdateAction

func (*UpdateAction) Apply

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

Apply applies the action

func (*UpdateAction) DescribeChanges added in v0.1.14

func (a *UpdateAction) DescribeChanges() util.NestedParameterMap

DescribeChanges returns text-based description of changes that will be applied

Jump to

Keyboard shortcuts

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