Documentation ¶
Index ¶
- func NewIteratorState(canaryInstances, allInstances []service.Instance, canaryLimit int) (*iteratorState, error)
- type BOSHTriggerer
- type BrokerServices
- type Builder
- type CFClient
- type CFTriggerer
- type Iterator
- type Listener
- type LoggingListener
- func (ll LoggingListener) CanariesFinished()
- func (ll LoggingListener) CanariesStarting(canaries int, filter config.CanarySelectionParams)
- func (ll LoggingListener) FailedToRefreshInstanceInfo(instance string)
- func (ll LoggingListener) Finished(orphanCount, finishedCount, skippedCount, deletedCount int, ...)
- func (ll LoggingListener) InstanceOperationFinished(instance string, result string)
- func (ll LoggingListener) InstanceOperationStartResult(instance string, status OperationState)
- func (ll LoggingListener) InstanceOperationStarting(instance string, index, totalInstances int, isCanary bool)
- func (ll LoggingListener) InstancesToProcess(instances []service.Instance)
- func (ll LoggingListener) Progress(pollingInterval time.Duration, ...)
- func (ll LoggingListener) RetryAttempt(num, limit int)
- func (ll LoggingListener) RetryCanariesAttempt(attempt, limit, remainingCanaries int)
- func (ll LoggingListener) Starting(maxInFlight int)
- func (ll LoggingListener) UpgradeStrategy(strategy string)
- func (ll LoggingListener) WaitingFor(instance string, boshTaskId int)
- type OperationState
- type TriggeredOperation
- type Triggerer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BOSHTriggerer ¶ added in v0.32.0
type BOSHTriggerer struct {
// contains filtered or unexported fields
}
func NewBOSHUpgradeTriggerer ¶ added in v0.32.0
func NewBOSHUpgradeTriggerer(brokerServices BrokerServices) *BOSHTriggerer
func NewRecreateTriggerer ¶
func NewRecreateTriggerer(brokerServices BrokerServices) *BOSHTriggerer
func (*BOSHTriggerer) Check ¶ added in v0.32.0
func (t *BOSHTriggerer) Check(serviceInstanceGUID string, operationData broker.OperationData) (TriggeredOperation, error)
func (*BOSHTriggerer) TriggerOperation ¶ added in v0.32.0
func (t *BOSHTriggerer) TriggerOperation(instance service.Instance) (TriggeredOperation, error)
type BrokerServices ¶
type BrokerServices interface { ProcessInstance(instance service.Instance, operationType string) (services.BOSHOperation, error) LastOperation(instance string, operationData broker.OperationData) (domain.LastOperation, error) Instances(filter map[string]string) ([]service.Instance, error) LatestInstanceInfo(inst service.Instance) (service.Instance, error) }
type Builder ¶
type Builder struct { BrokerServices BrokerServices PollingInterval time.Duration AttemptInterval time.Duration AttemptLimit int MaxInFlight int Canaries int Listener Listener Sleeper sleeper Triggerer Triggerer CanarySelectionParams config.CanarySelectionParams }
func NewBuilder ¶
func (*Builder) SetRecreateTriggerer ¶
type CFClient ¶ added in v0.32.0
type CFClient interface { CheckMinimumOSBAPIVersion(minimum string, logger *log.Logger) bool GetServiceInstance(serviceInstanceGUID string, logger *log.Logger) (cf.ServiceInstanceResource, error) UpgradeServiceInstance(serviceInstanceGUID string, maintenanceInfo cf.MaintenanceInfo, logger *log.Logger) (cf.LastOperation, error) GetLastOperationForInstance(serviceInstanceGUID string, logger *log.Logger) (cf.LastOperation, error) GetPlanByServiceInstanceGUID(planUniqueID string, logger *log.Logger) (cf.ServicePlan, error) }
type CFTriggerer ¶ added in v0.32.0
type CFTriggerer struct {
// contains filtered or unexported fields
}
func NewCFTrigger ¶ added in v0.32.0
func NewCFTrigger(client CFClient, logger *log.Logger) *CFTriggerer
func (*CFTriggerer) Check ¶ added in v0.32.0
func (t *CFTriggerer) Check(serviceInstanceGUID string, operationData broker.OperationData) (TriggeredOperation, error)
func (*CFTriggerer) TriggerOperation ¶ added in v0.32.0
func (t *CFTriggerer) TriggerOperation(instance service.Instance) (TriggeredOperation, error)
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
func (*Iterator) IterateInstancesWithAttempts ¶
type Listener ¶
type Listener interface { FailedToRefreshInstanceInfo(instance string) Starting(maxInFlight int) RetryAttempt(num, limit int) RetryCanariesAttempt(num, limit, remainingCanaries int) InstancesToProcess(instances []service.Instance) InstanceOperationStarting(instance string, index int, totalInstances int, isCanary bool) InstanceOperationStartResult(instance string, status OperationState) InstanceOperationFinished(instance string, result string) WaitingFor(instance string, boshTaskId int) Progress(pollingInterval time.Duration, orphanCount, processedCount, skippedCount, toRetryCount, deletedCount int) Finished(orphanCount, finishedCount, skippedCount, deletedCount int, busyInstances, failedInstances []string) CanariesStarting(canaries int, filter config.CanarySelectionParams) CanariesFinished() UpgradeStrategy(strategy string) }
type LoggingListener ¶
type LoggingListener struct {
// contains filtered or unexported fields
}
func (LoggingListener) CanariesFinished ¶
func (ll LoggingListener) CanariesFinished()
func (LoggingListener) CanariesStarting ¶
func (ll LoggingListener) CanariesStarting(canaries int, filter config.CanarySelectionParams)
func (LoggingListener) FailedToRefreshInstanceInfo ¶
func (ll LoggingListener) FailedToRefreshInstanceInfo(instance string)
func (LoggingListener) Finished ¶
func (ll LoggingListener) Finished(orphanCount, finishedCount, skippedCount, deletedCount int, busyInstances, failedInstances []string)
func (LoggingListener) InstanceOperationFinished ¶
func (ll LoggingListener) InstanceOperationFinished(instance string, result string)
func (LoggingListener) InstanceOperationStartResult ¶
func (ll LoggingListener) InstanceOperationStartResult(instance string, status OperationState)
func (LoggingListener) InstanceOperationStarting ¶
func (ll LoggingListener) InstanceOperationStarting(instance string, index, totalInstances int, isCanary bool)
func (LoggingListener) InstancesToProcess ¶
func (ll LoggingListener) InstancesToProcess(instances []service.Instance)
func (LoggingListener) Progress ¶
func (ll LoggingListener) Progress(pollingInterval time.Duration, orphanCount, processedCount, skippedCount, toRetryCount, deletedCount int)
func (LoggingListener) RetryAttempt ¶
func (ll LoggingListener) RetryAttempt(num, limit int)
func (LoggingListener) RetryCanariesAttempt ¶
func (ll LoggingListener) RetryCanariesAttempt(attempt, limit, remainingCanaries int)
func (LoggingListener) Starting ¶
func (ll LoggingListener) Starting(maxInFlight int)
func (LoggingListener) UpgradeStrategy ¶ added in v0.32.0
func (ll LoggingListener) UpgradeStrategy(strategy string)
func (LoggingListener) WaitingFor ¶
func (ll LoggingListener) WaitingFor(instance string, boshTaskId int)
type OperationState ¶ added in v0.32.0
type OperationState string
const ( OperationAccepted OperationState = "accepted" OperationSucceeded OperationState = "succeeded" OperationSkipped OperationState = "skipped" OperationFailed OperationState = "failed" OperationInProgress OperationState = "busy" InstanceNotFound OperationState = "instance-not-found" OperationPending OperationState = "not-started" OrphanDeployment OperationState = "orphan-deployment" )
type TriggeredOperation ¶ added in v0.32.0
type TriggeredOperation struct { State OperationState Data broker.OperationData Description string }
type Triggerer ¶
type Triggerer interface { TriggerOperation(service.Instance) (TriggeredOperation, error) Check(string, broker.OperationData) (TriggeredOperation, error) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.