process

package
v0.0.0-...-980806f Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: Apache-2.0, Apache-2.0 Imports: 10 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

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

UpdateOperation updates a given operation

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) *Queue

func (*Queue) Add

func (q *Queue) Add(processId string)

func (*Queue) Run

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

type StepProcessed

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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