services

package
v0.21.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2018 License: Apache-2.0 Imports: 13 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrokerServices

type BrokerServices struct {
	// contains filtered or unexported fields
}

func NewBrokerServices

func NewBrokerServices(client HTTPClient, authHeaderBuilder authorizationheader.AuthHeaderBuilder, baseURL string, logger *log.Logger) *BrokerServices

func (*BrokerServices) LastOperation

func (b *BrokerServices) LastOperation(instanceGUID string, operationData broker.OperationData) (brokerapi.LastOperation, error)

func (*BrokerServices) OrphanDeployments

func (b *BrokerServices) OrphanDeployments() ([]mgmtapi.Deployment, error)

func (*BrokerServices) UpgradeInstance

func (b *BrokerServices) UpgradeInstance(instance service.Instance) (UpgradeOperation, error)

type HTTPClient

type HTTPClient interface {
	Do(*http.Request) (*http.Response, error)
}

type ResponseConverter

type ResponseConverter struct{}

func (ResponseConverter) LastOperationFrom

func (r ResponseConverter) LastOperationFrom(response *http.Response) (brokerapi.LastOperation, error)

func (ResponseConverter) OrphanDeploymentsFrom

func (r ResponseConverter) OrphanDeploymentsFrom(response *http.Response) ([]mgmtapi.Deployment, error)

func (ResponseConverter) UpgradeOperationFrom

func (r ResponseConverter) UpgradeOperationFrom(response *http.Response) (UpgradeOperation, error)

type UpgradeOperation

type UpgradeOperation struct {
	Type        UpgradeOperationType
	Data        broker.OperationData
	Description string
}

type UpgradeOperationType

type UpgradeOperationType string
const (
	UpgradeAccepted     UpgradeOperationType = "accepted"
	OperationInProgress UpgradeOperationType = "busy"
	InstanceNotFound    UpgradeOperationType = "instance-not-found"
	OrphanDeployment    UpgradeOperationType = "orphan-deployment"
	UpgradePending      UpgradeOperationType = "not-started"

	UpgradeFailed    UpgradeOperationType = "failed"
	UpgradeSucceeded UpgradeOperationType = "succeeded"
)

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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