package types
import "k8s.io/kubernetes/pkg/volume/util/types"
Package types defines types used only by volume components
Index ¶
- Constants
- func IsFailedPreconditionError(err error) bool
- func IsFilesystemMismatchError(err error) bool
- func IsInfeasibleError(err error) bool
- func IsOperationFinishedError(err error) bool
- func IsOperationNotSupportedError(err error) bool
- func IsUncertainProgressError(err error) bool
- type CompleteFuncParam
- type FailedPrecondition
- func NewFailedPreconditionError(msg string) *FailedPrecondition
- func (err *FailedPrecondition) Error() string
- type GeneratedOperations
- type InfeasibleError
- type OperationContext
- type OperationNotSupported
- func NewOperationNotSupportedError(msg string) *OperationNotSupported
- func (err *OperationNotSupported) Error() string
- type TransientOperationFailure
- func NewTransientOperationFailure(msg string) *TransientOperationFailure
- func (err *TransientOperationFailure) Error() string
- type UncertainProgressError
- func NewUncertainProgressError(msg string) *UncertainProgressError
- func (err *UncertainProgressError) Error() string
- type UniquePVCName
- type UniquePodName
Constants ¶
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" )
Functions ¶
func IsFailedPreconditionError ¶
IsFailedPreconditionError checks if given error is of type that indicates operation failed with precondition
func IsFilesystemMismatchError ¶
IsFilesystemMismatchError checks if mount failed because requested filesystem on PVC and actual filesystem on disk did not match
func IsInfeasibleError ¶
func IsOperationFinishedError ¶
IsOperationFinishedError checks if given error is of type that indicates operation is finished with a FINAL error.
func IsOperationNotSupportedError ¶
func IsUncertainProgressError ¶
IsUncertainProgressError checks if given error is of type that indicates operation might be in-progress in background.
Types ¶
type CompleteFuncParam ¶
type FailedPrecondition ¶
type FailedPrecondition struct {
// contains filtered or unexported fields
}
FailedPrecondition error indicates CSI operation returned failed precondition error
func NewFailedPreconditionError ¶
func NewFailedPreconditionError(msg string) *FailedPrecondition
NewFailedPreconditionError returns a new FailedPrecondition error instance
func (*FailedPrecondition) Error ¶
func (err *FailedPrecondition) Error() string
type GeneratedOperations ¶
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 ¶
func (o *GeneratedOperations) Run() (eventErr, detailedErr error)
Run executes the operations and its supporting functions
type InfeasibleError ¶
type InfeasibleError struct {
// contains filtered or unexported fields
}
InfeasibleError errors are a subset of OperationFinished or final error codes. In terms of CSI - this usually means that, the operation is not possible in current state with given arguments.
func NewInfeasibleError ¶
func NewInfeasibleError(msg string) *InfeasibleError
NewInfeasibleError returns a new instance of InfeasibleError
func (*InfeasibleError) Error ¶
func (err *InfeasibleError) Error() string
type OperationContext ¶
func NewOperationContext ¶
func NewOperationContext(eventErr, detailedErr error, migrated bool) OperationContext
type OperationNotSupported ¶
type OperationNotSupported struct {
// contains filtered or unexported fields
}
func NewOperationNotSupportedError ¶
func NewOperationNotSupportedError(msg string) *OperationNotSupported
func (*OperationNotSupported) Error ¶
func (err *OperationNotSupported) Error() string
type TransientOperationFailure ¶
type TransientOperationFailure struct {
// contains filtered or unexported fields
}
TransientOperationFailure indicates operation failed with a transient error and may fix itself when retried.
func NewTransientOperationFailure ¶
func NewTransientOperationFailure(msg string) *TransientOperationFailure
NewTransientOperationFailure creates an instance of TransientOperationFailure error
func (*TransientOperationFailure) Error ¶
func (err *TransientOperationFailure) Error() string
type UncertainProgressError ¶
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 ¶
func NewUncertainProgressError(msg string) *UncertainProgressError
NewUncertainProgressError creates an instance of UncertainProgressError type
func (*UncertainProgressError) Error ¶
func (err *UncertainProgressError) Error() string
type UniquePVCName ¶
UniquePVCName defines the type to key pvc off
type UniquePodName ¶
UniquePodName defines the type to key pods off of
Source Files ¶
types.go
- Version
- v1.33.0 (latest)
- Published
- Apr 23, 2025
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 3 hours ago –
Tools for package owners.