types

package
v1.24.11 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 4 Imported by: 327

Documentation

Overview

Package types defines types used only by volume components

Index

Constants

View Source
const (
	// VolumeResizerKey is key that will be used to store resizer used
	// for resizing PVC. The generated key/value pair will be added
	// as a annotation to the PVC.
	VolumeResizerKey = "volume.kubernetes.io/storage-resizer"
)

Variables

This section is empty.

Functions

func IsFailedPreconditionError added in v1.19.0

func IsFailedPreconditionError(err error) bool

IsFailedPreconditionError checks if given error is of type that indicates operation failed with precondition

func IsFilesystemMismatchError added in v1.18.0

func IsFilesystemMismatchError(err error) bool

IsFilesystemMismatchError checks if mount failed because requested filesystem on PVC and actual filesystem on disk did not match

func IsOperationFinishedError added in v1.18.0

func IsOperationFinishedError(err error) bool

IsOperationFinishedError checks if given error is of type that indicates operation is finished with a FINAL error.

func IsUncertainProgressError added in v1.18.0

func IsUncertainProgressError(err error) bool

IsUncertainProgressError checks if given error is of type that indicates operation might be in-progress in background.

Types

type CompleteFuncParam added in v1.21.0

type CompleteFuncParam struct {
	Err      *error
	Migrated *bool
}

type FailedPrecondition added in v1.19.0

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

FailedPrecondition error indicates CSI operation returned failed precondition error

func NewFailedPreconditionError added in v1.19.0

func NewFailedPreconditionError(msg string) *FailedPrecondition

NewFailedPreconditionError returns a new FailedPrecondition error instance

func (*FailedPrecondition) Error added in v1.19.0

func (err *FailedPrecondition) Error() string

type GeneratedOperations added in v1.10.0

type GeneratedOperations struct {
	// Name of operation - could be used for resetting shared exponential backoff
	OperationName     string
	OperationFunc     func() (context OperationContext)
	EventRecorderFunc func(*error)
	CompleteFunc      func(CompleteFuncParam)
}

GeneratedOperations contains the operation that is created as well as supporting functions required for the operation executor

func (*GeneratedOperations) Run added in v1.15.0

func (o *GeneratedOperations) Run() (eventErr, detailedErr error)

Run executes the operations and its supporting functions

type OperationContext added in v1.21.0

type OperationContext struct {
	EventErr    error
	DetailedErr error
	Migrated    bool
}

func NewOperationContext added in v1.21.0

func NewOperationContext(eventErr, detailedErr error, migrated bool) OperationContext

type TransientOperationFailure added in v1.18.0

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

TransientOperationFailure indicates operation failed with a transient error and may fix itself when retried.

func NewTransientOperationFailure added in v1.18.0

func NewTransientOperationFailure(msg string) *TransientOperationFailure

NewTransientOperationFailure creates an instance of TransientOperationFailure error

func (*TransientOperationFailure) Error added in v1.18.0

func (err *TransientOperationFailure) Error() string

type UncertainProgressError added in v1.18.0

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

UncertainProgressError indicates operation failed with a non-final error and operation may be in-progress in background.

func NewUncertainProgressError added in v1.18.0

func NewUncertainProgressError(msg string) *UncertainProgressError

NewUncertainProgressError creates an instance of UncertainProgressError type

func (*UncertainProgressError) Error added in v1.18.0

func (err *UncertainProgressError) Error() string

type UniquePVCName added in v1.8.0

type UniquePVCName types.UID

UniquePVCName defines the type to key pvc off

type UniquePodName

type UniquePodName types.UID

UniquePodName defines the type to key pods off of

Jump to

Keyboard shortcuts

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