perconaservermongodbbackup

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2025 License: Apache-2.0 Imports: 42 Imported by: 1

Documentation

Overview

Package perconaservermongodbbackup is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager) error

Add creates a new PerconaServerMongoDBBackup Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.

Types

type Backup added in v1.4.0

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

func (*Backup) Close added in v1.4.0

func (b *Backup) Close(ctx context.Context) error

Close closes the PBM connection

func (*Backup) Start added in v1.4.0

Start requests backup on PBM

func (*Backup) Status added in v1.4.0

Status return backup status

type MockPBM added in v1.21.0

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

MockPBM is a mock of PBM interface.

func NewMockPBM added in v1.21.0

func NewMockPBM(ctrl *gomock.Controller) *MockPBM

NewMockPBM creates a new mock instance.

func (*MockPBM) AddProfile added in v1.21.0

func (m *MockPBM) AddProfile(ctx context.Context, k8sclient client.Client, cluster *v1.PerconaServerMongoDB, name string, stg v1.BackupStorageSpec) error

AddProfile mocks base method.

func (*MockPBM) Close added in v1.21.0

func (m *MockPBM) Close(ctx context.Context) error

Close mocks base method.

func (*MockPBM) Conn added in v1.21.0

func (m *MockPBM) Conn() *mongo.Client

Conn mocks base method.

func (*MockPBM) DeleteBackup added in v1.21.0

func (m *MockPBM) DeleteBackup(ctx context.Context, name string) error

DeleteBackup mocks base method.

func (*MockPBM) DeletePITRChunks added in v1.21.0

func (m *MockPBM) DeletePITRChunks(ctx context.Context, until primitive.Timestamp) error

DeletePITRChunks mocks base method.

func (*MockPBM) EXPECT added in v1.21.0

func (m *MockPBM) EXPECT() *MockPBMMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPBM) GetBackupMeta added in v1.21.0

func (m *MockPBM) GetBackupMeta(ctx context.Context, bcpName string) (*backup.BackupMeta, error)

GetBackupMeta mocks base method.

func (*MockPBM) GetConfig added in v1.21.0

func (m *MockPBM) GetConfig(ctx context.Context) (*config.Config, error)

GetConfig mocks base method.

func (*MockPBM) GetConfigVar added in v1.21.0

func (m *MockPBM) GetConfigVar(ctx context.Context, key string) (any, error)

GetConfigVar mocks base method.

func (*MockPBM) GetLatestTimelinePITR added in v1.21.0

func (m *MockPBM) GetLatestTimelinePITR(ctx context.Context) (oplog.Timeline, error)

GetLatestTimelinePITR mocks base method.

func (*MockPBM) GetNSetConfig added in v1.21.0

func (m *MockPBM) GetNSetConfig(ctx context.Context, k8sclient client.Client, cluster *v1.PerconaServerMongoDB) error

GetNSetConfig mocks base method.

func (*MockPBM) GetNSetConfigLegacy added in v1.21.0

func (m *MockPBM) GetNSetConfigLegacy(ctx context.Context, k8sclient client.Client, cluster *v1.PerconaServerMongoDB, stg v1.BackupStorageSpec) error

GetNSetConfigLegacy mocks base method.

func (*MockPBM) GetPITRChunkContains added in v1.21.0

func (m *MockPBM) GetPITRChunkContains(ctx context.Context, unixTS int64) (*oplog.OplogChunk, error)

GetPITRChunkContains mocks base method.

func (*MockPBM) GetProfile added in v1.21.0

func (m *MockPBM) GetProfile(ctx context.Context, name string) (*config.Config, error)

GetProfile mocks base method.

func (*MockPBM) GetRestoreMeta added in v1.21.0

func (m *MockPBM) GetRestoreMeta(ctx context.Context, name string) (*restore.RestoreMeta, error)

GetRestoreMeta mocks base method.

func (*MockPBM) GetStorage added in v1.21.0

func (m *MockPBM) GetStorage(ctx context.Context, e log.LogEvent) (storage.Storage, error)

GetStorage mocks base method.

func (*MockPBM) HasLocks added in v1.21.0

func (m *MockPBM) HasLocks(ctx context.Context, predicates ...backup0.LockHeaderPredicate) (bool, error)

HasLocks mocks base method.

func (*MockPBM) Logger added in v1.21.0

func (m *MockPBM) Logger() log.Logger

Logger mocks base method.

func (*MockPBM) Node added in v1.21.0

func (m *MockPBM) Node(ctx context.Context) (string, error)

Node mocks base method.

func (*MockPBM) PITRChunksCollection added in v1.21.0

func (m *MockPBM) PITRChunksCollection() *mongo.Collection

PITRChunksCollection mocks base method.

func (*MockPBM) PITRGetChunksSlice added in v1.21.0

func (m *MockPBM) PITRGetChunksSlice(ctx context.Context, rs string, from, to primitive.Timestamp) ([]oplog.OplogChunk, error)

PITRGetChunksSlice mocks base method.

func (*MockPBM) RemoveProfile added in v1.21.0

func (m *MockPBM) RemoveProfile(ctx context.Context, name string) error

RemoveProfile mocks base method.

func (*MockPBM) ResyncMainStorage added in v1.21.0

func (m *MockPBM) ResyncMainStorage(ctx context.Context) error

ResyncMainStorage mocks base method.

func (*MockPBM) ResyncMainStorageAndWait added in v1.21.0

func (m *MockPBM) ResyncMainStorageAndWait(ctx context.Context) error

ResyncMainStorageAndWait mocks base method.

func (*MockPBM) ResyncProfile added in v1.21.0

func (m *MockPBM) ResyncProfile(ctx context.Context, name string) error

ResyncProfile mocks base method.

func (*MockPBM) ResyncProfileAndWait added in v1.21.0

func (m *MockPBM) ResyncProfileAndWait(ctx context.Context, name string) error

ResyncProfileAndWait mocks base method.

func (*MockPBM) SendCmd added in v1.21.0

func (m *MockPBM) SendCmd(ctx context.Context, cmd ctrl.Cmd) error

SendCmd mocks base method.

func (*MockPBM) SetConfig added in v1.21.0

func (m *MockPBM) SetConfig(ctx context.Context, cfg *config.Config) error

SetConfig mocks base method.

func (*MockPBM) SetConfigVar added in v1.21.0

func (m *MockPBM) SetConfigVar(ctx context.Context, key, val string) error

SetConfigVar mocks base method.

func (*MockPBM) ValidateBackup added in v1.21.0

func (m *MockPBM) ValidateBackup(ctx context.Context, cfg *config.Config, bcp *v1.PerconaServerMongoDBBackup) error

ValidateBackup mocks base method.

type MockPBMMockRecorder added in v1.21.0

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

MockPBMMockRecorder is the mock recorder for MockPBM.

func (*MockPBMMockRecorder) AddProfile added in v1.21.0

func (mr *MockPBMMockRecorder) AddProfile(ctx, k8sclient, cluster, name, stg interface{}) *gomock.Call

AddProfile indicates an expected call of AddProfile.

func (*MockPBMMockRecorder) Close added in v1.21.0

func (mr *MockPBMMockRecorder) Close(ctx interface{}) *gomock.Call

Close indicates an expected call of Close.

func (*MockPBMMockRecorder) Conn added in v1.21.0

func (mr *MockPBMMockRecorder) Conn() *gomock.Call

Conn indicates an expected call of Conn.

func (*MockPBMMockRecorder) DeleteBackup added in v1.21.0

func (mr *MockPBMMockRecorder) DeleteBackup(ctx, name interface{}) *gomock.Call

DeleteBackup indicates an expected call of DeleteBackup.

func (*MockPBMMockRecorder) DeletePITRChunks added in v1.21.0

func (mr *MockPBMMockRecorder) DeletePITRChunks(ctx, until interface{}) *gomock.Call

DeletePITRChunks indicates an expected call of DeletePITRChunks.

func (*MockPBMMockRecorder) GetBackupMeta added in v1.21.0

func (mr *MockPBMMockRecorder) GetBackupMeta(ctx, bcpName interface{}) *gomock.Call

GetBackupMeta indicates an expected call of GetBackupMeta.

func (*MockPBMMockRecorder) GetConfig added in v1.21.0

func (mr *MockPBMMockRecorder) GetConfig(ctx interface{}) *gomock.Call

GetConfig indicates an expected call of GetConfig.

func (*MockPBMMockRecorder) GetConfigVar added in v1.21.0

func (mr *MockPBMMockRecorder) GetConfigVar(ctx, key interface{}) *gomock.Call

GetConfigVar indicates an expected call of GetConfigVar.

func (*MockPBMMockRecorder) GetLatestTimelinePITR added in v1.21.0

func (mr *MockPBMMockRecorder) GetLatestTimelinePITR(ctx interface{}) *gomock.Call

GetLatestTimelinePITR indicates an expected call of GetLatestTimelinePITR.

func (*MockPBMMockRecorder) GetNSetConfig added in v1.21.0

func (mr *MockPBMMockRecorder) GetNSetConfig(ctx, k8sclient, cluster interface{}) *gomock.Call

GetNSetConfig indicates an expected call of GetNSetConfig.

func (*MockPBMMockRecorder) GetNSetConfigLegacy added in v1.21.0

func (mr *MockPBMMockRecorder) GetNSetConfigLegacy(ctx, k8sclient, cluster, stg interface{}) *gomock.Call

GetNSetConfigLegacy indicates an expected call of GetNSetConfigLegacy.

func (*MockPBMMockRecorder) GetPITRChunkContains added in v1.21.0

func (mr *MockPBMMockRecorder) GetPITRChunkContains(ctx, unixTS interface{}) *gomock.Call

GetPITRChunkContains indicates an expected call of GetPITRChunkContains.

func (*MockPBMMockRecorder) GetProfile added in v1.21.0

func (mr *MockPBMMockRecorder) GetProfile(ctx, name interface{}) *gomock.Call

GetProfile indicates an expected call of GetProfile.

func (*MockPBMMockRecorder) GetRestoreMeta added in v1.21.0

func (mr *MockPBMMockRecorder) GetRestoreMeta(ctx, name interface{}) *gomock.Call

GetRestoreMeta indicates an expected call of GetRestoreMeta.

func (*MockPBMMockRecorder) GetStorage added in v1.21.0

func (mr *MockPBMMockRecorder) GetStorage(ctx, e interface{}) *gomock.Call

GetStorage indicates an expected call of GetStorage.

func (*MockPBMMockRecorder) HasLocks added in v1.21.0

func (mr *MockPBMMockRecorder) HasLocks(ctx interface{}, predicates ...interface{}) *gomock.Call

HasLocks indicates an expected call of HasLocks.

func (*MockPBMMockRecorder) Logger added in v1.21.0

func (mr *MockPBMMockRecorder) Logger() *gomock.Call

Logger indicates an expected call of Logger.

func (*MockPBMMockRecorder) Node added in v1.21.0

func (mr *MockPBMMockRecorder) Node(ctx interface{}) *gomock.Call

Node indicates an expected call of Node.

func (*MockPBMMockRecorder) PITRChunksCollection added in v1.21.0

func (mr *MockPBMMockRecorder) PITRChunksCollection() *gomock.Call

PITRChunksCollection indicates an expected call of PITRChunksCollection.

func (*MockPBMMockRecorder) PITRGetChunksSlice added in v1.21.0

func (mr *MockPBMMockRecorder) PITRGetChunksSlice(ctx, rs, from, to interface{}) *gomock.Call

PITRGetChunksSlice indicates an expected call of PITRGetChunksSlice.

func (*MockPBMMockRecorder) RemoveProfile added in v1.21.0

func (mr *MockPBMMockRecorder) RemoveProfile(ctx, name interface{}) *gomock.Call

RemoveProfile indicates an expected call of RemoveProfile.

func (*MockPBMMockRecorder) ResyncMainStorage added in v1.21.0

func (mr *MockPBMMockRecorder) ResyncMainStorage(ctx interface{}) *gomock.Call

ResyncMainStorage indicates an expected call of ResyncMainStorage.

func (*MockPBMMockRecorder) ResyncMainStorageAndWait added in v1.21.0

func (mr *MockPBMMockRecorder) ResyncMainStorageAndWait(ctx interface{}) *gomock.Call

ResyncMainStorageAndWait indicates an expected call of ResyncMainStorageAndWait.

func (*MockPBMMockRecorder) ResyncProfile added in v1.21.0

func (mr *MockPBMMockRecorder) ResyncProfile(ctx, name interface{}) *gomock.Call

ResyncProfile indicates an expected call of ResyncProfile.

func (*MockPBMMockRecorder) ResyncProfileAndWait added in v1.21.0

func (mr *MockPBMMockRecorder) ResyncProfileAndWait(ctx, name interface{}) *gomock.Call

ResyncProfileAndWait indicates an expected call of ResyncProfileAndWait.

func (*MockPBMMockRecorder) SendCmd added in v1.21.0

func (mr *MockPBMMockRecorder) SendCmd(ctx, cmd interface{}) *gomock.Call

SendCmd indicates an expected call of SendCmd.

func (*MockPBMMockRecorder) SetConfig added in v1.21.0

func (mr *MockPBMMockRecorder) SetConfig(ctx, cfg interface{}) *gomock.Call

SetConfig indicates an expected call of SetConfig.

func (*MockPBMMockRecorder) SetConfigVar added in v1.21.0

func (mr *MockPBMMockRecorder) SetConfigVar(ctx, key, val interface{}) *gomock.Call

SetConfigVar indicates an expected call of SetConfigVar.

func (*MockPBMMockRecorder) ValidateBackup added in v1.21.0

func (mr *MockPBMMockRecorder) ValidateBackup(ctx, cfg, bcp interface{}) *gomock.Call

ValidateBackup indicates an expected call of ValidateBackup.

type ReconcilePerconaServerMongoDBBackup

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

ReconcilePerconaServerMongoDBBackup reconciles a PerconaServerMongoDBBackup object

func (*ReconcilePerconaServerMongoDBBackup) Reconcile

Reconcile reads that state of the cluster for a PerconaServerMongoDBBackup object and makes changes based on the state read and what is in the PerconaServerMongoDBBackup.Spec Note: The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.

Jump to

Keyboard shortcuts

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