process

package
v0.0.0-...-dc8ed20 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: Apache-2.0, Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeprovisionOperationManager

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

func NewDeprovisionOperationManager

func NewDeprovisionOperationManager(storage storage.Operations) *DeprovisionOperationManager

func (*DeprovisionOperationManager) InsertOperation

InsertOperation stores operation in database

func (*DeprovisionOperationManager) OperationFailed

OperationFailed marks the operation as failed and only repeats it if there is a storage error

func (*DeprovisionOperationManager) OperationSucceeded

OperationSucceeded marks the operation as succeeded and only repeats it if there is a storage error

func (*DeprovisionOperationManager) RetryOperation

RetryOperation retries an operation for at maxTime in retryInterval steps and fails the operation if retrying failed

func (*DeprovisionOperationManager) RetryOperationOnce

RetryOperationOnce retries the operation once and fails the operation when call second time

func (*DeprovisionOperationManager) RetryOperationWithoutFail

func (om *DeprovisionOperationManager) RetryOperationWithoutFail(operation internal.DeprovisioningOperation, description string, retryInterval, maxTime time.Duration, log logrus.FieldLogger) (internal.DeprovisioningOperation, time.Duration, error)

RetryOperationWithoutFail retries an operation for at maxTime in retryInterval steps and omits the operation if retrying failed

func (*DeprovisionOperationManager) UpdateOperation

UpdateOperation updates a given operation and handles conflict situation

type DeprovisioningStepProcessed

type DeprovisioningStepProcessed struct {
	StepProcessed
	OldOperation internal.DeprovisioningOperation
	Operation    internal.DeprovisioningOperation
}

type Executor

type Executor interface {
	Execute(operationID string) (time.Duration, error)
}

type ProvisionOperationManager

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

func NewProvisionOperationManager

func NewProvisionOperationManager(storage storage.Operations) *ProvisionOperationManager

func (*ProvisionOperationManager) HandleError

func (*ProvisionOperationManager) OperationFailed

OperationFailed marks the operation as failed and only repeats it if there is a storage error

func (*ProvisionOperationManager) OperationSucceeded

OperationSucceeded marks the operation as succeeded and only repeats it if there is a storage error

func (*ProvisionOperationManager) RetryOperation

func (om *ProvisionOperationManager) RetryOperation(operation internal.ProvisioningOperation, errorMessage string, retryInterval time.Duration, maxTime time.Duration, log logrus.FieldLogger) (internal.ProvisioningOperation, time.Duration, error)

RetryOperation retries an operation for at maxTime in retryInterval steps and fails the operation if retrying failed

func (*ProvisionOperationManager) RetryOperationOnce

RetryOperationOnce retries the operation once and fails the operation when call second time

func (*ProvisionOperationManager) SimpleUpdateOperation deprecated

Deprecated: SimpleUpdateOperation updates a given operation without handling conflicts. Should be used when operation's data mutations are not clear

func (*ProvisionOperationManager) UpdateOperation

UpdateOperation updates a given operation and handles conflict situation

type ProvisioningStepProcessed

type ProvisioningStepProcessed struct {
	StepProcessed
	OldOperation internal.ProvisioningOperation
	Operation    internal.ProvisioningOperation
}

type Queue

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

func NewQueue

func NewQueue(executor Executor, log logrus.FieldLogger) *Queue

func (*Queue) Add

func (q *Queue) Add(processId string)

func (*Queue) AddAfter

func (q *Queue) AddAfter(processId string, duration time.Duration)

func (*Queue) Run

func (q *Queue) Run(stop <-chan struct{}, workersAmount int)

func (*Queue) ShutDown

func (q *Queue) ShutDown()

func (*Queue) SpeedUp

func (q *Queue) SpeedUp(speedFactor int64)

SpeedUp changes speedFactor parameter to reduce time between processing operations. This method should only be used for testing purposes

type StepProcessed

type StepProcessed struct {
	StepName string
	Duration time.Duration
	When     time.Duration
	Error    error
}

type UpgradeClusterOperationManager

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

func NewUpgradeClusterOperationManager

func NewUpgradeClusterOperationManager(storage storage.Operations) *UpgradeClusterOperationManager

func (*UpgradeClusterOperationManager) OperationCanceled

OperationSucceeded marks the operation as succeeded and only repeats it if there is a storage error

func (*UpgradeClusterOperationManager) OperationFailed

OperationFailed marks the operation as failed and only repeats it if there is a storage error

func (*UpgradeClusterOperationManager) OperationSucceeded

OperationSucceeded marks the operation as succeeded and only repeats it if there is a storage error

func (*UpgradeClusterOperationManager) RetryOperation

RetryOperation retries an operation for at maxTime in retryInterval steps and fails the operation if retrying failed

func (*UpgradeClusterOperationManager) RetryOperationWithoutFail

func (om *UpgradeClusterOperationManager) RetryOperationWithoutFail(operation internal.UpgradeClusterOperation, description string, retryInterval, maxTime time.Duration, log logrus.FieldLogger) (internal.UpgradeClusterOperation, time.Duration, error)

RetryOperationWithoutFail retries an operation for at maxTime in retryInterval steps and omits the operation if retrying failed

func (*UpgradeClusterOperationManager) SimpleUpdateOperation deprecated

Deprecated: SimpleUpdateOperation updates a given operation without handling conflicts. Should be used when operation's data mutations are not clear

func (*UpgradeClusterOperationManager) UpdateOperation

UpdateOperation updates a given operation

type UpgradeClusterStepProcessed

type UpgradeClusterStepProcessed struct {
	StepProcessed
	OldOperation internal.UpgradeClusterOperation
	Operation    internal.UpgradeClusterOperation
}

type UpgradeKymaOperationManager

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

func NewUpgradeKymaOperationManager

func NewUpgradeKymaOperationManager(storage storage.Operations) *UpgradeKymaOperationManager

func (*UpgradeKymaOperationManager) OperationCanceled

OperationSucceeded marks the operation as succeeded and only repeats it if there is a storage error

func (*UpgradeKymaOperationManager) OperationFailed

OperationFailed marks the operation as failed and only repeats it if there is a storage error

func (*UpgradeKymaOperationManager) OperationSucceeded

OperationSucceeded marks the operation as succeeded and only repeats it if there is a storage error

func (*UpgradeKymaOperationManager) RetryOperation

func (om *UpgradeKymaOperationManager) RetryOperation(operation internal.UpgradeKymaOperation, errorMessage string, retryInterval time.Duration, maxTime time.Duration, log logrus.FieldLogger) (internal.UpgradeKymaOperation, time.Duration, error)

RetryOperation retries an operation for at maxTime in retryInterval steps and fails the operation if retrying failed

func (*UpgradeKymaOperationManager) RetryOperationWithoutFail

func (om *UpgradeKymaOperationManager) RetryOperationWithoutFail(operation internal.UpgradeKymaOperation, description string, retryInterval, maxTime time.Duration, log logrus.FieldLogger) (internal.UpgradeKymaOperation, time.Duration, error)

RetryOperationWithoutFail retries an operation for at maxTime in retryInterval steps and omits the operation if retrying failed

func (*UpgradeKymaOperationManager) SimpleUpdateOperation deprecated

Deprecated: SimpleUpdateOperation updates a given operation without handling conflicts. Should be used when operation's data mutations are not clear

func (*UpgradeKymaOperationManager) UpdateOperation

UpdateOperation updates a given operation and handles conflict situation

type UpgradeKymaStepProcessed

type UpgradeKymaStepProcessed struct {
	StepProcessed
	OldOperation internal.UpgradeKymaOperation
	Operation    internal.UpgradeKymaOperation
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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