clonepvc

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: AGPL-3.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 ClonePVCOptions

type ClonePVCOptions struct {
	WaitForSnapshotTimeout helpers.MaxWaitTime
	DestStorageClassName   string // Override the storage class used for the created volume. Must be compatible with the snapshot.
	DestPvcNamePrefix      string // Override the prefix used for the created volume name
	ForceBind              bool   // Force the PVC to be bound immediately. This should be set if the storage class does not have `volumeBindingMode: Immediate` set, because the snapshot will be deleted after the PVC is created.
	ForceBindTimeout       helpers.MaxWaitTime
	CleanupTimeout         helpers.MaxWaitTime
}

type MockProviderInterface

type MockProviderInterface struct {
	mock.Mock
}

MockProviderInterface is an autogenerated mock type for the ProviderInterface type

func NewMockProviderInterface

func NewMockProviderInterface(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockProviderInterface

NewMockProviderInterface creates a new instance of MockProviderInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockProviderInterface) ClonePVC

func (_m *MockProviderInterface) ClonePVC(ctx *contexts.Context, namespace string, pvcName string, opts ClonePVCOptions) (*v1.PersistentVolumeClaim, error)

ClonePVC provides a mock function with given fields: ctx, namespace, pvcName, opts

func (*MockProviderInterface) EXPECT

type MockProviderInterface_ClonePVC_Call

type MockProviderInterface_ClonePVC_Call struct {
	*mock.Call
}

MockProviderInterface_ClonePVC_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClonePVC'

func (*MockProviderInterface_ClonePVC_Call) Return

func (*MockProviderInterface_ClonePVC_Call) Run

type MockProviderInterface_Expecter

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

func (*MockProviderInterface_Expecter) ClonePVC

func (_e *MockProviderInterface_Expecter) ClonePVC(ctx interface{}, namespace interface{}, pvcName interface{}, opts interface{}) *MockProviderInterface_ClonePVC_Call

ClonePVC is a helper method to define mock.On call

  • ctx *contexts.Context
  • namespace string
  • pvcName string
  • opts ClonePVCOptions

type Provider

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

func NewProvider

func NewProvider(coreClient core.ClientInterface, esClient externalsnapshotter.ClientInterface) *Provider

func (*Provider) ClonePVC

func (p *Provider) ClonePVC(ctx *contexts.Context, namespace, pvcName string, opts ClonePVCOptions) (clonedPvc *corev1.PersistentVolumeClaim, err error)

Snapshots a given volume and clones it. Callers are responsible for ensuring consistency.

type ProviderInterface

type ProviderInterface interface {
	ClonePVC(ctx *contexts.Context, namespace, pvcName string, opts ClonePVCOptions) (clonedPvc *corev1.PersistentVolumeClaim, err error)
}

Jump to

Keyboard shortcuts

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