Documentation ¶
Index ¶
- Constants
- func NewDeploymentNotFoundError(e error) error
- func NewOperationAlreadyCompletedError(e error) error
- func NewOperationInProgressError(e error) error
- func NewPendingChangesNotAppliedError(e error) error
- func NewServiceError(e error) error
- type BoshClient
- type Broker
- func (b *Broker) Bind(ctx context.Context, instanceID, bindingID string, details domain.BindDetails, ...) (domain.Binding, error)
- func (b *Broker) CountInstancesOfPlans(logger *log.Logger) (map[cf.ServicePlan]int, error)
- func (b *Broker) Deprovision(ctx context.Context, instanceID string, ...) (domain.DeprovisionServiceSpec, error)
- func (b *Broker) GetBinding(ctx context.Context, instanceID, bindingID string, ...) (domain.GetBindingSpec, error)
- func (b *Broker) GetInstance(ctx context.Context, instanceID string, ...) (domain.GetInstanceDetailsSpec, error)
- func (b *Broker) GetServiceInstanceClient(instanceID string, contextMap map[string]interface{}) (map[string]string, error)
- func (b *Broker) Instances(filter map[string]string, logger *log.Logger) ([]service.Instance, error)
- func (b *Broker) LastBindingOperation(ctx context.Context, instanceID, bindingID string, details domain.PollDetails) (domain.LastOperation, error)
- func (b *Broker) LastOperation(ctx context.Context, instanceID string, pollDetails domain.PollDetails) (domain.LastOperation, error)
- func (b *Broker) OrphanDeployments(logger *log.Logger) ([]string, error)
- func (b *Broker) Provision(ctx context.Context, instanceID string, details domain.ProvisionDetails, ...) (domain.ProvisionedServiceSpec, error)
- func (b *Broker) Recreate(ctx context.Context, instanceID string, details domain.UpdateDetails, ...) (OperationData, error)
- func (b *Broker) Services(ctx context.Context) ([]domain.Service, error)
- func (b *Broker) SetUAAClient(uaaClient UAAClient)
- func (b *Broker) Unbind(ctx context.Context, instanceID, bindingID string, ...) (domain.UnbindSpec, error)
- func (b *Broker) Update(ctx context.Context, instanceID string, details domain.UpdateDetails, ...) (domain.UpdateServiceSpec, error)
- func (b *Broker) UpdateServiceInstanceClient(instanceID, dashboardURL string, siClient map[string]string, ...) error
- func (b *Broker) Upgrade(ctx context.Context, instanceID string, details domain.UpdateDetails, ...) (OperationData, string, error)
- type BrokerError
- type CloudFoundryClient
- type Decider
- type Deployer
- type DeploymentNotFoundError
- type DisplayableError
- type Errand
- type Hasher
- type LifeCycleRunner
- type ManifestSecret
- type ManifestSecretManager
- type OperationAlreadyCompletedError
- type OperationData
- type OperationInProgressError
- type OperationType
- type PendingChangesNotAppliedError
- type PlanNotFoundError
- type PostDeployErrand
- type PreDeleteErrand
- type ServiceAdapterClient
- type ServiceError
- type StartupChecker
- type TaskInProgressError
- type TelemetryLogger
- type UAAClient
- type Validator
Constants ¶
View Source
const ( ComponentName = "on-demand-service-broker" OperationTypeCreate = OperationType("create") OperationTypeUpdate = OperationType("update") OperationTypeUpgrade = OperationType("upgrade") OperationTypeRecreate = OperationType("recreate") OperationTypeDelete = OperationType("delete") OperationTypeForceDelete = OperationType("force-delete") OperationTypeBind = OperationType("bind") OperationTypeUnbind = OperationType("unbind") MinimumCFVersion = "2.57.0" MinimumMajorStemcellDirectorVersionForODB = 3262 MinimumMajorSemverDirectorVersionForLifecycleErrands = 261 )
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 ¶
func NewServiceError ¶
Types ¶
type BoshClient ¶
type BoshClient interface { GetTask(taskID int, logger *log.Logger) (boshdirector.BoshTask, error) GetTasksInProgress(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, force bool, taskReporter *boshdirector.AsyncTaskReporter, logger *log.Logger) (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) Deploy(manifest []byte, contextID string, logger *log.Logger, reporter *boshdirector.AsyncTaskReporter) (int, error) Recreate(deploymentName, contextID string, logger *log.Logger, taskReporter *boshdirector.AsyncTaskReporter) (int, error) GetConfigs(configName string, logger *log.Logger) ([]boshdirector.BoshConfig, error) DeleteConfig(configType, configName string, logger *log.Logger) (bool, error) DeleteConfigs(configName string, logger *log.Logger) error }
type Broker ¶
type Broker struct { ExposeOperationalErrors bool EnablePlanSchemas bool EnableSecureManifests bool SupportBackupAgentBinding bool DisableBoshConfigs 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, manifestSecretManager ManifestSecretManager, instanceLister service.InstanceLister, hasher Hasher, loggerFactory *loggerfactory.LoggerFactory, telemetryLogger TelemetryLogger, decider Decider) (*Broker, error)
func (*Broker) CountInstancesOfPlans ¶
func (*Broker) Deprovision ¶
func (b *Broker) Deprovision( ctx context.Context, instanceID string, deprovisionDetails domain.DeprovisionDetails, asyncAllowed bool, ) (domain.DeprovisionServiceSpec, error)
func (*Broker) GetBinding ¶
func (b *Broker) GetBinding(ctx context.Context, instanceID, bindingID string, bindingsDetails domain.FetchBindingDetails) (domain.GetBindingSpec, error)
func (*Broker) GetInstance ¶
func (b *Broker) GetInstance(ctx context.Context, instanceID string, instanceDetails domain.FetchInstanceDetails) (domain.GetInstanceDetailsSpec, error)
func (*Broker) GetServiceInstanceClient ¶
func (*Broker) LastBindingOperation ¶
func (b *Broker) LastBindingOperation(ctx context.Context, instanceID, bindingID string, details domain.PollDetails) (domain.LastOperation, error)
func (*Broker) LastOperation ¶
func (b *Broker) LastOperation( ctx context.Context, instanceID string, pollDetails domain.PollDetails, ) (domain.LastOperation, error)
func (*Broker) OrphanDeployments ¶
func (*Broker) Provision ¶
func (b *Broker) Provision( ctx context.Context, instanceID string, details domain.ProvisionDetails, asyncAllowed bool) (domain.ProvisionedServiceSpec, error)
func (*Broker) Recreate ¶
func (b *Broker) Recreate(ctx context.Context, instanceID string, details domain.UpdateDetails, logger *log.Logger) (OperationData, error)
func (*Broker) SetUAAClient ¶
func (*Broker) Unbind ¶
func (b *Broker) Unbind( ctx context.Context, instanceID, bindingID string, details domain.UnbindDetails, asyncAllowed bool, ) (domain.UnbindSpec, error)
func (*Broker) Update ¶
func (b *Broker) Update( ctx context.Context, instanceID string, details domain.UpdateDetails, asyncAllowed bool, ) (domain.UpdateServiceSpec, error)
func (*Broker) UpdateServiceInstanceClient ¶
type BrokerError ¶
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) GetServiceInstances(filter cf.GetInstancesFilter, logger *log.Logger) ([]cf.Instance, error) }
type Deployer ¶
type Deployer interface { Create(deploymentName, planID string, requestParams map[string]interface{}, boshContextID string, uaaClient map[string]string, logger *log.Logger) (int, []byte, error) Update(deploymentName, planID string, requestParams map[string]interface{}, previousPlanID *string, boshContextID string, secretsMap map[string]string, uaaClient map[string]string, logger *log.Logger) (int, []byte, error) Upgrade(deploymentName string, plan config.Plan, requestParams map[string]interface{}, boshContextID string, uaaClient map[string]string, logger *log.Logger) (int, []byte, error) Recreate(deploymentName, planID, boshContextID string, logger *log.Logger) (int, error) }
type DeploymentNotFoundError ¶
type DeploymentNotFoundError struct {
// contains filtered or unexported fields
}
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 ¶
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 ManifestSecret ¶
type ManifestSecretManager ¶
type OperationAlreadyCompletedError ¶
type OperationAlreadyCompletedError struct {
// contains filtered or unexported fields
}
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 PendingChangesNotAppliedError ¶
type PendingChangesNotAppliedError struct {
// contains filtered or unexported fields
}
type PlanNotFoundError ¶
type PlanNotFoundError struct {
PlanGUID string
}
func (PlanNotFoundError) Error ¶
func (e PlanNotFoundError) Error() string
type PostDeployErrand ¶
type PreDeleteErrand ¶
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{}, secretsMap map[string]string, dnsAddresses map[string]string, logger *log.Logger) error GenerateDashboardUrl(instanceID string, plan serviceadapter.Plan, manifest []byte, logger *log.Logger) (string, error) GeneratePlanSchema(plan serviceadapter.Plan, logger *log.Logger) (domain.ServiceSchemas, error) }
type ServiceError ¶
type ServiceError struct {
// contains filtered or unexported fields
}
type StartupChecker ¶
type StartupChecker interface {
Check() error
}
type TaskInProgressError ¶
type TaskInProgressError struct {
Message string
}
func (TaskInProgressError) Error ¶
func (e TaskInProgressError) Error() string
type TelemetryLogger ¶
type TelemetryLogger interface {
LogInstances(instanceLister service.InstanceLister, item string, operation string)
}
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
func NewValidator ¶
func (*Validator) ValidateParams ¶
func (*Validator) ValidateSchema ¶
Source Files ¶
- bind.go
- broker.go
- broker_helpers.go
- catalog.go
- count_instances.go
- deprovision.go
- errors.go
- get_binding.go
- get_instance.go
- instances.go
- last_binding_operation.go
- last_operation.go
- lifecycle_runner.go
- manifest_secrets.go
- orphan_deployments.go
- provision.go
- quotas.go
- recreate.go
- schema.go
- service_instance_client.go
- unbind.go
- update.go
- upgrade.go
Click to show internal directories.
Click to hide internal directories.