Documentation ¶
Index ¶
- Constants
- func NewOperationInProgressError(e error) error
- type BoshClient
- type Broker
- func (b *Broker) Bind(ctx context.Context, instanceID, bindingID string, ...) (brokerapi.Binding, error)
- func (b *Broker) CountInstancesOfPlans(logger *log.Logger) (map[cf.ServicePlan]int, error)
- func (b *Broker) Deprovision(ctx context.Context, instanceID string, ...) (brokerapi.DeprovisionServiceSpec, error)
- func (b *Broker) FilteredInstances(orgName, spaceName string, logger *log.Logger) ([]service.Instance, error)
- func (b *Broker) Instances(logger *log.Logger) ([]service.Instance, error)
- func (b *Broker) LastOperation(ctx context.Context, instanceID, operationDataRaw string) (brokerapi.LastOperation, error)
- func (b *Broker) OrphanDeployments(logger *log.Logger) ([]string, error)
- func (b *Broker) Provision(ctx context.Context, instanceID string, details brokerapi.ProvisionDetails, ...) (brokerapi.ProvisionedServiceSpec, error)
- func (b *Broker) Services(ctx context.Context) ([]brokerapi.Service, error)
- func (b *Broker) Unbind(ctx context.Context, instanceID, bindingID string, ...) error
- func (b *Broker) Update(ctx context.Context, instanceID string, details brokerapi.UpdateDetails, ...) (brokerapi.UpdateServiceSpec, error)
- func (b *Broker) Upgrade(ctx context.Context, instanceID string, details brokerapi.UpdateDetails, ...) (OperationData, error)
- type BrokerError
- type CloudFoundryClient
- type Deployer
- type DisplayableError
- type Errand
- type LifeCycleRunner
- type ManifestSecretResolver
- type OperationData
- type OperationInProgressError
- type OperationType
- type PostDeployErrand
- type PreDeleteErrand
- type ServiceAdapterClient
- type StartupChecker
- type Validator
Constants ¶
View Source
const ( OperationTypeCreate = OperationType("create") OperationTypeUpdate = OperationType("update") OperationTypeUpgrade = OperationType("upgrade") OperationTypeDelete = OperationType("delete") OperationTypeBind = OperationType("bind") OperationTypeUnbind = OperationType("unbind") MinimumCFVersion = "2.57.0" MinimumMajorStemcellDirectorVersionForODB = 3262 MinimumMajorSemverDirectorVersionForLifecycleErrands = 261 MinimumSemverVersionForBindingWithDNS = "266.3.0" )
View Source
const ( GenericErrorPrefix = "There was a problem completing your request. Please contact your operations team providing the following information:" PendingChangesErrorMessage = "The service broker has been updated, and this service instance is out of date. Please contact your operator." OperationInProgressMessage = "An operation is in progress for your service instance. Please try again later." UpdateLoggerAction = "" )
View Source
const InstancePrefix = "service-instance_"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BoshClient ¶
type BoshClient interface { GetTask(taskID int, logger *log.Logger) (boshdirector.BoshTask, error) GetTasks(deploymentName string, logger *log.Logger) (boshdirector.BoshTasks, error) GetNormalisedTasksByContext(deploymentName, contextID string, logger *log.Logger) (boshdirector.BoshTasks, error) VMs(deploymentName string, logger *log.Logger) (bosh.BoshVMs, error) GetDeployment(name string, logger *log.Logger) ([]byte, bool, error) GetDeployments(logger *log.Logger) ([]boshdirector.Deployment, error) DeleteDeployment(name, contextID string, logger *log.Logger, taskReporter *boshdirector.AsyncTaskReporter) (int, error) GetInfo(logger *log.Logger) (boshdirector.Info, error) RunErrand(deploymentName, errandName string, errandInstances []string, contextID string, logger *log.Logger, taskReporter *boshdirector.AsyncTaskReporter) (int, error) Variables(deploymentName string, logger *log.Logger) ([]boshdirector.Variable, error) VerifyAuth(logger *log.Logger) error GetDNSAddresses(deploymentName string, requestedDNS []config.BindingDNS) (map[string]string, error) }
type Broker ¶
type Broker struct { ExposeOperationalErrors bool EnablePlanSchemas bool EnableResolveSecretsAtBind bool // contains filtered or unexported fields }
func New ¶
func New( boshClient BoshClient, cfClient CloudFoundryClient, serviceOffering config.ServiceOffering, brokerConfig config.Broker, startupCheckers []StartupChecker, serviceAdapter ServiceAdapterClient, deployer Deployer, manifestSecretResolver ManifestSecretResolver, loggerFactory *loggerfactory.LoggerFactory, ) (*Broker, error)
func (*Broker) CountInstancesOfPlans ¶
func (*Broker) Deprovision ¶
func (b *Broker) Deprovision( ctx context.Context, instanceID string, deprovisionDetails brokerapi.DeprovisionDetails, asyncAllowed bool, ) (brokerapi.DeprovisionServiceSpec, error)
func (*Broker) FilteredInstances ¶ added in v0.21.0
func (*Broker) LastOperation ¶
func (*Broker) OrphanDeployments ¶
func (*Broker) Provision ¶
func (b *Broker) Provision(ctx context.Context, instanceID string, details brokerapi.ProvisionDetails, asyncAllowed bool) (brokerapi.ProvisionedServiceSpec, error)
type BrokerError ¶ added in v0.20.0
type CloudFoundryClient ¶
type CloudFoundryClient interface { GetAPIVersion(logger *log.Logger) (string, error) CountInstancesOfPlan(serviceOfferingID, planID string, logger *log.Logger) (int, error) CountInstancesOfServiceOffering(serviceOfferingID string, logger *log.Logger) (instanceCountByPlanID map[cf.ServicePlan]int, err error) GetInstanceState(serviceInstanceGUID string, logger *log.Logger) (cf.InstanceState, error) GetInstancesOfServiceOffering(serviceOfferingID string, logger *log.Logger) ([]service.Instance, error) GetInstancesOfServiceOfferingByOrgSpace(serviceOfferingID, orgName, spaceName string, logger *log.Logger) ([]service.Instance, error) }
type Deployer ¶
type Deployer interface { Create(deploymentName, planID string, requestParams map[string]interface{}, boshContextID string, logger *log.Logger) (int, []byte, error) Update(deploymentName, planID string, requestParams map[string]interface{}, previousPlanID *string, boshContextID string, logger *log.Logger) (int, []byte, error) Upgrade(deploymentName, planID string, previousPlanID *string, boshContextID string, logger *log.Logger) (int, []byte, error) }
type DisplayableError ¶
type DisplayableError struct {
// contains filtered or unexported fields
}
func NewBoshRequestError ¶
func NewBoshRequestError(action string, requestError error) DisplayableError
func NewDisplayableError ¶
func NewDisplayableError(errorForCFUser, errForOperator error) DisplayableError
func NewGenericError ¶
func NewGenericError(ctx context.Context, err error) DisplayableError
func (DisplayableError) Error ¶
func (e DisplayableError) Error() string
func (DisplayableError) ErrorForCFUser ¶
func (e DisplayableError) ErrorForCFUser() error
func (DisplayableError) ExtendedCFError ¶ added in v0.20.0
func (e DisplayableError) ExtendedCFError() error
type LifeCycleRunner ¶
type LifeCycleRunner struct {
// contains filtered or unexported fields
}
func NewLifeCycleRunner ¶
func NewLifeCycleRunner( boshClient BoshClient, plans config.Plans, ) LifeCycleRunner
func (LifeCycleRunner) GetTask ¶
func (l LifeCycleRunner) GetTask(deploymentName string, operationData OperationData, logger *log.Logger, ) (boshdirector.BoshTask, error)
type ManifestSecretResolver ¶ added in v0.22.0
type OperationData ¶
type OperationData struct { BoshTaskID int BoshContextID string `json:",omitempty"` OperationType OperationType PlanID string `json:",omitempty"` PostDeployErrand PostDeployErrand // DEPRECATED: only needed for compatibility with ODB 0.20.x PreDeleteErrand PreDeleteErrand // DEPRECATED: only needed for compatibility with ODB 0.20.x Errands []config.Errand `json:",omitempty"` }
type OperationInProgressError ¶
type OperationInProgressError struct {
// contains filtered or unexported fields
}
type OperationType ¶
type OperationType string
type PostDeployErrand ¶ added in v0.18.0
type PreDeleteErrand ¶ added in v0.19.0
type ServiceAdapterClient ¶
type ServiceAdapterClient interface { CreateBinding(bindingID string, deploymentTopology bosh.BoshVMs, manifest []byte, requestParams map[string]interface{}, secretsMap, dnsAddresses map[string]string, logger *log.Logger) (serviceadapter.Binding, error) DeleteBinding(bindingID string, deploymentTopology bosh.BoshVMs, manifest []byte, requestParams map[string]interface{}, logger *log.Logger) error GenerateDashboardUrl(instanceID string, plan serviceadapter.Plan, manifest []byte, logger *log.Logger) (string, error) GeneratePlanSchema(plan serviceadapter.Plan, logger *log.Logger) (brokerapi.ServiceSchemas, error) }
type StartupChecker ¶ added in v0.18.0
type StartupChecker interface {
Check() error
}
type Validator ¶ added in v0.21.0
type Validator struct {
// contains filtered or unexported fields
}
func NewValidator ¶ added in v0.21.0
func (*Validator) ValidateParams ¶ added in v0.21.0
func (*Validator) ValidateSchema ¶ added in v0.21.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.