compatibility

package
v4.2.0-rc2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ThreeToFour

type ThreeToFour struct {
	Wrapped brokerapi.ServiceBroker
	// contains filtered or unexported fields
}

ThreetoFour is a brokerapi.ServiceBroker wrapper that tells users when they are using legacy plan IDs and how to upgrade them.

func NewLegacyPlanUpgrader

func NewLegacyPlanUpgrader(wrapped brokerapi.ServiceBroker) *ThreeToFour

NewLegacyPlanUpgrader wraps a service broker with an interface that requires provisioned services which are instances of legacy plans (which had GUIDs generated at runtime rather than fixed and are therefore different per-install) to upgrade to their fixed counterpart before any operations can be done on them.

func (*ThreeToFour) Bind

func (t *ThreeToFour) Bind(ctx context.Context, instanceID, bindingID string, details brokerapi.BindDetails) (brokerapi.Binding, error)

Bind calls the wrapped service broker unless the plan is legacy, in which case the user is told how to upgrade first.

func (*ThreeToFour) Deprovision

func (t *ThreeToFour) Deprovision(ctx context.Context, instanceID string, details brokerapi.DeprovisionDetails, asyncAllowed bool) (brokerapi.DeprovisionServiceSpec, error)

Deprovision calls the wrapped service broker unless the plan is legacy, in which case the user is told how to upgrade first.

func (*ThreeToFour) LastOperation

func (t *ThreeToFour) LastOperation(ctx context.Context, instanceID, operationData string) (brokerapi.LastOperation, error)

LastOperation calls the wrapped service broker

func (*ThreeToFour) Provision

func (t *ThreeToFour) Provision(ctx context.Context, instanceID string, details brokerapi.ProvisionDetails, asyncAllowed bool) (brokerapi.ProvisionedServiceSpec, error)

Provision calls the wrapped service broker unless the plan is legacy, in which case the user is told which plan to use instead.

func (*ThreeToFour) Services

func (t *ThreeToFour) Services(ctx context.Context) ([]brokerapi.Service, error)

Services returns the list of enabled services, with dummy services injected for legacy compatibility.

func (*ThreeToFour) Unbind

func (t *ThreeToFour) Unbind(ctx context.Context, instanceID, bindingID string, details brokerapi.UnbindDetails) error

Unbind calls the wrapped service broker unless the plan is legacy, in which case the user is told how to upgrade first.

func (*ThreeToFour) Update

func (t *ThreeToFour) Update(ctx context.Context, instanceID string, details brokerapi.UpdateDetails, asyncAllowed bool) (brokerapi.UpdateServiceSpec, error)

Update checks if the update is for a plan change from legacy to the defined acceptable upgrade plan and modifies the database if so.

Jump to

Keyboard shortcuts

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