backuptoolinstance

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: AGPL-3.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const ImageEnvVar = "BACKUP_TOOL_IMAGE"

ImageEnvVar overrides the image of the GRPC pods the tool starts, e.g. with a digest-pinned ref. Unset, the pods use constants.FullImageName.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupToolInstance

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

func (*BackupToolInstance) Delete

func (b *BackupToolInstance) Delete(ctx *contexts.Context) (err error)

func (*BackupToolInstance) GetGRPCClient

func (b *BackupToolInstance) GetGRPCClient(ctx *contexts.Context) (clients.ClientInterface, error)

GetGRPCClient connects to the backup tool instance's GRPC server using the pod's IP address. The driver always runs in-cluster (as a Job/pod), so the pod IP is directly routable and there is no need for a Service, cluster DNS, or kube-proxy. The GRPC channel is plaintext, so there is no TLS hostname to verify against either.

func (*BackupToolInstance) GetPod

func (b *BackupToolInstance) GetPod() *corev1.Pod

type BackupToolInstanceInterface

type BackupToolInstanceInterface interface {
	GetPod() *corev1.Pod
	GetGRPCClient(ctx *contexts.Context) (clients.ClientInterface, error)
	Delete(ctx *contexts.Context) error
	// contains filtered or unexported methods
}

type CreateBackupToolInstanceOptions

type CreateBackupToolInstanceOptions struct {
	NamePrefix     string                       `yaml:"namePrefix,omitempty"`
	Volumes        []core.SingleContainerVolume `yaml:"volumes,omitempty"`
	CleanupTimeout helpers.MaxWaitTime          `yaml:"cleanupTimeout,omitempty"`
	PodWaitTimeout helpers.MaxWaitTime          `yaml:"podWaitTimeout,omitempty"`
}

type MockBackupToolInstanceInterface

type MockBackupToolInstanceInterface struct {
	mock.Mock
}

MockBackupToolInstanceInterface is an autogenerated mock type for the BackupToolInstanceInterface type

func NewMockBackupToolInstanceInterface

func NewMockBackupToolInstanceInterface(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockBackupToolInstanceInterface

NewMockBackupToolInstanceInterface creates a new instance of MockBackupToolInstanceInterface. 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 (*MockBackupToolInstanceInterface) Delete

Delete provides a mock function with given fields: ctx

func (*MockBackupToolInstanceInterface) EXPECT

func (*MockBackupToolInstanceInterface) GetGRPCClient

GetGRPCClient provides a mock function with given fields: ctx

func (*MockBackupToolInstanceInterface) GetPod

func (_m *MockBackupToolInstanceInterface) GetPod() *v1.Pod

GetPod provides a mock function with no fields

type MockBackupToolInstanceInterface_Delete_Call

type MockBackupToolInstanceInterface_Delete_Call struct {
	*mock.Call
}

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

func (*MockBackupToolInstanceInterface_Delete_Call) Return

func (*MockBackupToolInstanceInterface_Delete_Call) Run

func (*MockBackupToolInstanceInterface_Delete_Call) RunAndReturn

type MockBackupToolInstanceInterface_Expecter

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

func (*MockBackupToolInstanceInterface_Expecter) Delete

Delete is a helper method to define mock.On call

  • ctx *contexts.Context

func (*MockBackupToolInstanceInterface_Expecter) GetGRPCClient

GetGRPCClient is a helper method to define mock.On call

  • ctx *contexts.Context

func (*MockBackupToolInstanceInterface_Expecter) GetPod

GetPod is a helper method to define mock.On call

type MockBackupToolInstanceInterface_GetGRPCClient_Call

type MockBackupToolInstanceInterface_GetGRPCClient_Call struct {
	*mock.Call
}

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

func (*MockBackupToolInstanceInterface_GetGRPCClient_Call) Return

func (*MockBackupToolInstanceInterface_GetGRPCClient_Call) Run

func (*MockBackupToolInstanceInterface_GetGRPCClient_Call) RunAndReturn

type MockBackupToolInstanceInterface_GetPod_Call

type MockBackupToolInstanceInterface_GetPod_Call struct {
	*mock.Call
}

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

func (*MockBackupToolInstanceInterface_GetPod_Call) Return

func (*MockBackupToolInstanceInterface_GetPod_Call) Run

func (*MockBackupToolInstanceInterface_GetPod_Call) RunAndReturn

type MockBackupToolInstanceInterface_setPod_Call

type MockBackupToolInstanceInterface_setPod_Call struct {
	*mock.Call
}

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

func (*MockBackupToolInstanceInterface_setPod_Call) Return

func (*MockBackupToolInstanceInterface_setPod_Call) Run

func (*MockBackupToolInstanceInterface_setPod_Call) RunAndReturn

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

func (_m *MockProviderInterface) CreateBackupToolInstance(ctx *contexts.Context, namespace string, instance string, opts CreateBackupToolInstanceOptions) (BackupToolInstanceInterface, error)

CreateBackupToolInstance provides a mock function with given fields: ctx, namespace, instance, opts

func (*MockProviderInterface) EXPECT

type MockProviderInterface_CreateBackupToolInstance_Call

type MockProviderInterface_CreateBackupToolInstance_Call struct {
	*mock.Call
}

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

func (*MockProviderInterface_CreateBackupToolInstance_Call) Return

func (*MockProviderInterface_CreateBackupToolInstance_Call) Run

type MockProviderInterface_Expecter

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

func (*MockProviderInterface_Expecter) CreateBackupToolInstance

func (_e *MockProviderInterface_Expecter) CreateBackupToolInstance(ctx interface{}, namespace interface{}, instance interface{}, opts interface{}) *MockProviderInterface_CreateBackupToolInstance_Call

CreateBackupToolInstance is a helper method to define mock.On call

  • ctx *contexts.Context
  • namespace string
  • instance string
  • opts CreateBackupToolInstanceOptions

type Provider

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

func NewProvider

func NewProvider(coreClient core.ClientInterface) *Provider

func (*Provider) CreateBackupToolInstance

func (p *Provider) CreateBackupToolInstance(ctx *contexts.Context, namespace, instance string, opts CreateBackupToolInstanceOptions) (btInstance BackupToolInstanceInterface, err error)

type ProviderInterface

type ProviderInterface interface {
	CreateBackupToolInstance(ctx *contexts.Context, namespace, instance string, opts CreateBackupToolInstanceOptions) (btInstance BackupToolInstanceInterface, err error)
}

Jump to

Keyboard shortcuts

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