services

package
v0.0.0-...-fb356ce Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InstanceNotFoundError = errors.New("Service instance not found")
)

Functions

This section is empty.

Types

type BOSHOperation

type BOSHOperation struct {
	Type        BOSHOperationType
	Data        broker.OperationData
	Description string
}

type BOSHOperationType

type BOSHOperationType string
const (
	InstanceNotFound    BOSHOperationType = "instance-not-found"
	OrphanDeployment    BOSHOperationType = "orphan-deployment"
	OperationAccepted   BOSHOperationType = "accepted"
	OperationFailed     BOSHOperationType = "failed"
	OperationInProgress BOSHOperationType = "busy"
	OperationPending    BOSHOperationType = "not-started"
	OperationSucceeded  BOSHOperationType = "succeeded"
	OperationSkipped    BOSHOperationType = "skipped"
)

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) Instances

func (b *BrokerServices) Instances(filter map[string]string) ([]service.Instance, error)

func (*BrokerServices) LastOperation

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

func (*BrokerServices) LatestInstanceInfo

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

func (*BrokerServices) OrphanDeployments

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

func (*BrokerServices) ProcessInstance

func (b *BrokerServices) ProcessInstance(instance service.Instance, operationType string) (BOSHOperation, error)

type HTTPClient

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

type ResponseConverter

type ResponseConverter struct{}

func (ResponseConverter) ExtractOperationFrom

func (r ResponseConverter) ExtractOperationFrom(response *http.Response) (BOSHOperation, error)

func (ResponseConverter) LastOperationFrom

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

func (ResponseConverter) OrphanDeploymentsFrom

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

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