component

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2018 License: Apache-2.0 Imports: 9 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 claim, remove claim, etc).

Index

Constants

This section is empty.

Variables

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

AttachClaimActionObject 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 DetachClaimActionObject = &runtime.Info{
	Kind:        "action-component-claim-detach",
	Constructor: func() runtime.Object { return &DetachClaimAction{} },
}

DetachClaimActionObject 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 AttachClaimAction added in v0.1.15

type AttachClaimAction struct {
	runtime.TypeKind `yaml:",inline"`
	*action.Metadata
	ComponentKey string
	ClaimKey     string
	Depth        int
}

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

func NewAttachClaimAction added in v0.1.15

func NewAttachClaimAction(componentKey string, claimKey string, depth int) *AttachClaimAction

NewAttachClaimAction creates new AttachClaimAction

func (*AttachClaimAction) Apply added in v0.1.15

func (a *AttachClaimAction) Apply(context *action.Context) (errResult error)

Apply applies the action

func (*AttachClaimAction) DescribeChanges added in v0.1.15

func (a *AttachClaimAction) 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) (errResult 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) (errResult 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 DetachClaimAction added in v0.1.15

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

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

func NewDetachClaimAction added in v0.1.15

func NewDetachClaimAction(componentKey string, claimKey string) *DetachClaimAction

NewDetachClaimAction creates new DetachClaimAction

func (*DetachClaimAction) Apply added in v0.1.15

func (a *DetachClaimAction) Apply(context *action.Context) (errResult error)

Apply applies the action

func (*DetachClaimAction) DescribeChanges added in v0.1.15

func (a *DetachClaimAction) 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) (errResult 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) (errResult 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