Documentation
¶
Overview ¶
Package perconaservermongodbbackup is a generated GoMock package.
Index ¶
- func Add(mgr manager.Manager) error
- type Backup
- type MockPBM
- func (m *MockPBM) AddProfile(ctx context.Context, k8sclient client.Client, cluster *v1.PerconaServerMongoDB, ...) error
- func (m *MockPBM) Close(ctx context.Context) error
- func (m *MockPBM) Conn() *mongo.Client
- func (m *MockPBM) DeleteBackup(ctx context.Context, name string) error
- func (m *MockPBM) DeletePITRChunks(ctx context.Context, until primitive.Timestamp) error
- func (m *MockPBM) EXPECT() *MockPBMMockRecorder
- func (m *MockPBM) GetBackupMeta(ctx context.Context, bcpName string) (*backup.BackupMeta, error)
- func (m *MockPBM) GetConfig(ctx context.Context) (*config.Config, error)
- func (m *MockPBM) GetConfigVar(ctx context.Context, key string) (any, error)
- func (m *MockPBM) GetLatestTimelinePITR(ctx context.Context) (oplog.Timeline, error)
- func (m *MockPBM) GetNSetConfig(ctx context.Context, k8sclient client.Client, cluster *v1.PerconaServerMongoDB) error
- func (m *MockPBM) GetNSetConfigLegacy(ctx context.Context, k8sclient client.Client, cluster *v1.PerconaServerMongoDB, ...) error
- func (m *MockPBM) GetPITRChunkContains(ctx context.Context, unixTS int64) (*oplog.OplogChunk, error)
- func (m *MockPBM) GetProfile(ctx context.Context, name string) (*config.Config, error)
- func (m *MockPBM) GetRestoreMeta(ctx context.Context, name string) (*restore.RestoreMeta, error)
- func (m *MockPBM) GetStorage(ctx context.Context, e log.LogEvent) (storage.Storage, error)
- func (m *MockPBM) HasLocks(ctx context.Context, predicates ...backup0.LockHeaderPredicate) (bool, error)
- func (m *MockPBM) Logger() log.Logger
- func (m *MockPBM) Node(ctx context.Context) (string, error)
- func (m *MockPBM) PITRChunksCollection() *mongo.Collection
- func (m *MockPBM) PITRGetChunksSlice(ctx context.Context, rs string, from, to primitive.Timestamp) ([]oplog.OplogChunk, error)
- func (m *MockPBM) RemoveProfile(ctx context.Context, name string) error
- func (m *MockPBM) ResyncMainStorage(ctx context.Context) error
- func (m *MockPBM) ResyncMainStorageAndWait(ctx context.Context) error
- func (m *MockPBM) ResyncProfile(ctx context.Context, name string) error
- func (m *MockPBM) ResyncProfileAndWait(ctx context.Context, name string) error
- func (m *MockPBM) SendCmd(ctx context.Context, cmd ctrl.Cmd) error
- func (m *MockPBM) SetConfig(ctx context.Context, cfg *config.Config) error
- func (m *MockPBM) SetConfigVar(ctx context.Context, key, val string) error
- func (m *MockPBM) ValidateBackup(ctx context.Context, cfg *config.Config, bcp *v1.PerconaServerMongoDBBackup) error
- type MockPBMMockRecorder
- func (mr *MockPBMMockRecorder) AddProfile(ctx, k8sclient, cluster, name, stg interface{}) *gomock.Call
- func (mr *MockPBMMockRecorder) Close(ctx interface{}) *gomock.Call
- func (mr *MockPBMMockRecorder) Conn() *gomock.Call
- func (mr *MockPBMMockRecorder) DeleteBackup(ctx, name interface{}) *gomock.Call
- func (mr *MockPBMMockRecorder) DeletePITRChunks(ctx, until interface{}) *gomock.Call
- func (mr *MockPBMMockRecorder) GetBackupMeta(ctx, bcpName interface{}) *gomock.Call
- func (mr *MockPBMMockRecorder) GetConfig(ctx interface{}) *gomock.Call
- func (mr *MockPBMMockRecorder) GetConfigVar(ctx, key interface{}) *gomock.Call
- func (mr *MockPBMMockRecorder) GetLatestTimelinePITR(ctx interface{}) *gomock.Call
- func (mr *MockPBMMockRecorder) GetNSetConfig(ctx, k8sclient, cluster interface{}) *gomock.Call
- func (mr *MockPBMMockRecorder) GetNSetConfigLegacy(ctx, k8sclient, cluster, stg interface{}) *gomock.Call
- func (mr *MockPBMMockRecorder) GetPITRChunkContains(ctx, unixTS interface{}) *gomock.Call
- func (mr *MockPBMMockRecorder) GetProfile(ctx, name interface{}) *gomock.Call
- func (mr *MockPBMMockRecorder) GetRestoreMeta(ctx, name interface{}) *gomock.Call
- func (mr *MockPBMMockRecorder) GetStorage(ctx, e interface{}) *gomock.Call
- func (mr *MockPBMMockRecorder) HasLocks(ctx interface{}, predicates ...interface{}) *gomock.Call
- func (mr *MockPBMMockRecorder) Logger() *gomock.Call
- func (mr *MockPBMMockRecorder) Node(ctx interface{}) *gomock.Call
- func (mr *MockPBMMockRecorder) PITRChunksCollection() *gomock.Call
- func (mr *MockPBMMockRecorder) PITRGetChunksSlice(ctx, rs, from, to interface{}) *gomock.Call
- func (mr *MockPBMMockRecorder) RemoveProfile(ctx, name interface{}) *gomock.Call
- func (mr *MockPBMMockRecorder) ResyncMainStorage(ctx interface{}) *gomock.Call
- func (mr *MockPBMMockRecorder) ResyncMainStorageAndWait(ctx interface{}) *gomock.Call
- func (mr *MockPBMMockRecorder) ResyncProfile(ctx, name interface{}) *gomock.Call
- func (mr *MockPBMMockRecorder) ResyncProfileAndWait(ctx, name interface{}) *gomock.Call
- func (mr *MockPBMMockRecorder) SendCmd(ctx, cmd interface{}) *gomock.Call
- func (mr *MockPBMMockRecorder) SetConfig(ctx, cfg interface{}) *gomock.Call
- func (mr *MockPBMMockRecorder) SetConfigVar(ctx, key, val interface{}) *gomock.Call
- func (mr *MockPBMMockRecorder) ValidateBackup(ctx, cfg, bcp interface{}) *gomock.Call
- type ReconcilePerconaServerMongoDBBackup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Backup ¶ added in v1.4.0
type Backup struct {
// contains filtered or unexported fields
}
func (*Backup) Start ¶ added in v1.4.0
func (b *Backup) Start(ctx context.Context, k8sclient client.Client, cluster *api.PerconaServerMongoDB, cr *api.PerconaServerMongoDBBackup) (api.PerconaServerMongoDBBackupStatus, error)
Start requests backup on PBM
func (*Backup) Status ¶ added in v1.4.0
func (b *Backup) Status(ctx context.Context, cr *api.PerconaServerMongoDBBackup) (api.PerconaServerMongoDBBackupStatus, error)
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) DeleteBackup ¶ added in v1.21.0
DeleteBackup mocks base method.
func (*MockPBM) DeletePITRChunks ¶ added in v1.21.0
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
GetBackupMeta mocks base method.
func (*MockPBM) GetConfigVar ¶ added in v1.21.0
GetConfigVar mocks base method.
func (*MockPBM) GetLatestTimelinePITR ¶ added in v1.21.0
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
GetProfile mocks base method.
func (*MockPBM) GetRestoreMeta ¶ added in v1.21.0
GetRestoreMeta mocks base method.
func (*MockPBM) GetStorage ¶ added in v1.21.0
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) 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
RemoveProfile mocks base method.
func (*MockPBM) ResyncMainStorage ¶ added in v1.21.0
ResyncMainStorage mocks base method.
func (*MockPBM) ResyncMainStorageAndWait ¶ added in v1.21.0
ResyncMainStorageAndWait mocks base method.
func (*MockPBM) ResyncProfile ¶ added in v1.21.0
ResyncProfile mocks base method.
func (*MockPBM) ResyncProfileAndWait ¶ added in v1.21.0
ResyncProfileAndWait mocks base method.
func (*MockPBM) SetConfigVar ¶ added in v1.21.0
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 ¶
func (r *ReconcilePerconaServerMongoDBBackup) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
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.