Documentation
¶
Index ¶
- type CleanupAction
- type ConsistencyPointConsumer
- type MockCleanupAction
- func (_m *MockCleanupAction) Cleanup(ctx *contexts.Context) error
- func (_m *MockCleanupAction) EXPECT() *MockCleanupAction_Expecter
- func (_m *MockCleanupAction) Execute(ctx *contexts.Context, backupToolClient clients.ClientInterface) error
- func (_m *MockCleanupAction) Setup(ctx *contexts.Context, ...) error
- func (_m *MockCleanupAction) Validate(ctx *contexts.Context) error
- type MockCleanupAction_Cleanup_Call
- func (_c *MockCleanupAction_Cleanup_Call) Return(_a0 error) *MockCleanupAction_Cleanup_Call
- func (_c *MockCleanupAction_Cleanup_Call) Run(run func(ctx *contexts.Context)) *MockCleanupAction_Cleanup_Call
- func (_c *MockCleanupAction_Cleanup_Call) RunAndReturn(run func(*contexts.Context) error) *MockCleanupAction_Cleanup_Call
- type MockCleanupAction_Execute_Call
- func (_c *MockCleanupAction_Execute_Call) Return(_a0 error) *MockCleanupAction_Execute_Call
- func (_c *MockCleanupAction_Execute_Call) Run(run func(ctx *contexts.Context, backupToolClient clients.ClientInterface)) *MockCleanupAction_Execute_Call
- func (_c *MockCleanupAction_Execute_Call) RunAndReturn(run func(*contexts.Context, clients.ClientInterface) error) *MockCleanupAction_Execute_Call
- type MockCleanupAction_Expecter
- func (_e *MockCleanupAction_Expecter) Cleanup(ctx interface{}) *MockCleanupAction_Cleanup_Call
- func (_e *MockCleanupAction_Expecter) Execute(ctx interface{}, backupToolClient interface{}) *MockCleanupAction_Execute_Call
- func (_e *MockCleanupAction_Expecter) Setup(ctx interface{}, btiOpts interface{}) *MockCleanupAction_Setup_Call
- func (_e *MockCleanupAction_Expecter) Validate(ctx interface{}) *MockCleanupAction_Validate_Call
- type MockCleanupAction_Setup_Call
- type MockCleanupAction_Validate_Call
- func (_c *MockCleanupAction_Validate_Call) Return(_a0 error) *MockCleanupAction_Validate_Call
- func (_c *MockCleanupAction_Validate_Call) Run(run func(ctx *contexts.Context)) *MockCleanupAction_Validate_Call
- func (_c *MockCleanupAction_Validate_Call) RunAndReturn(run func(*contexts.Context) error) *MockCleanupAction_Validate_Call
- type MockRemoteAction
- func (_m *MockRemoteAction) EXPECT() *MockRemoteAction_Expecter
- func (_m *MockRemoteAction) Execute(ctx *contexts.Context, backupToolClient clients.ClientInterface) error
- func (_m *MockRemoteAction) Setup(ctx *contexts.Context, ...) error
- func (_m *MockRemoteAction) Validate(ctx *contexts.Context) error
- type MockRemoteAction_Execute_Call
- func (_c *MockRemoteAction_Execute_Call) Return(_a0 error) *MockRemoteAction_Execute_Call
- func (_c *MockRemoteAction_Execute_Call) Run(run func(ctx *contexts.Context, backupToolClient clients.ClientInterface)) *MockRemoteAction_Execute_Call
- func (_c *MockRemoteAction_Execute_Call) RunAndReturn(run func(*contexts.Context, clients.ClientInterface) error) *MockRemoteAction_Execute_Call
- type MockRemoteAction_Expecter
- func (_e *MockRemoteAction_Expecter) Execute(ctx interface{}, backupToolClient interface{}) *MockRemoteAction_Execute_Call
- func (_e *MockRemoteAction_Expecter) Setup(ctx interface{}, btiOpts interface{}) *MockRemoteAction_Setup_Call
- func (_e *MockRemoteAction_Expecter) Validate(ctx interface{}) *MockRemoteAction_Validate_Call
- type MockRemoteAction_Setup_Call
- type MockRemoteAction_Validate_Call
- func (_c *MockRemoteAction_Validate_Call) Return(_a0 error) *MockRemoteAction_Validate_Call
- func (_c *MockRemoteAction_Validate_Call) Run(run func(ctx *contexts.Context)) *MockRemoteAction_Validate_Call
- func (_c *MockRemoteAction_Validate_Call) RunAndReturn(run func(*contexts.Context) error) *MockRemoteAction_Validate_Call
- type MockRemoteStageInterface
- type MockRemoteStageInterface_Expecter
- type MockRemoteStageInterface_Run_Call
- func (_c *MockRemoteStageInterface_Run_Call) Return(_a0 error) *MockRemoteStageInterface_Run_Call
- func (_c *MockRemoteStageInterface_Run_Call) Run(run func(ctx *contexts.Context)) *MockRemoteStageInterface_Run_Call
- func (_c *MockRemoteStageInterface_Run_Call) RunAndReturn(run func(*contexts.Context) error) *MockRemoteStageInterface_Run_Call
- type MockRemoteStageInterface_WithAction_Call
- func (_c *MockRemoteStageInterface_WithAction_Call) Return(_a0 RemoteStageInterface) *MockRemoteStageInterface_WithAction_Call
- func (_c *MockRemoteStageInterface_WithAction_Call) Run(run func(friendlyName string, action RemoteAction)) *MockRemoteStageInterface_WithAction_Call
- func (_c *MockRemoteStageInterface_WithAction_Call) RunAndReturn(run func(string, RemoteAction) RemoteStageInterface) *MockRemoteStageInterface_WithAction_Call
- type PreConsistencyPointAction
- type RemoteAction
- type RemoteStage
- type RemoteStageInterface
- type RemoteStageOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CleanupAction ¶
type CleanupAction interface {
RemoteAction
Cleanup(ctx *contexts.Context) error
}
type ConsistencyPointConsumer ¶ added in v0.0.13
ConsistencyPointConsumer is an optional capability of a RemoteAction that needs the event's shared consistency point in order to align to it (a cloned cluster recovers forward to it; a non-DB capture is taken as of it). The stage calls SetConsistencyPoint after every PreConsistencyPointAction has run and before Setup. Unlike PreConsistencyPointAction this is a value sink rather than a lifecycle step the stage runs, so it is a plain capability and does not embed RemoteAction.
type MockCleanupAction ¶
MockCleanupAction is an autogenerated mock type for the CleanupAction type
func NewMockCleanupAction ¶
func NewMockCleanupAction(t interface {
mock.TestingT
Cleanup(func())
}) *MockCleanupAction
NewMockCleanupAction creates a new instance of MockCleanupAction. 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 (*MockCleanupAction) Cleanup ¶
func (_m *MockCleanupAction) Cleanup(ctx *contexts.Context) error
Cleanup provides a mock function with given fields: ctx
func (*MockCleanupAction) EXPECT ¶
func (_m *MockCleanupAction) EXPECT() *MockCleanupAction_Expecter
func (*MockCleanupAction) Execute ¶
func (_m *MockCleanupAction) Execute(ctx *contexts.Context, backupToolClient clients.ClientInterface) error
Execute provides a mock function with given fields: ctx, backupToolClient
func (*MockCleanupAction) Setup ¶
func (_m *MockCleanupAction) Setup(ctx *contexts.Context, btiOpts *backuptoolinstance.CreateBackupToolInstanceOptions) error
Setup provides a mock function with given fields: ctx, btiOpts
type MockCleanupAction_Cleanup_Call ¶
MockCleanupAction_Cleanup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Cleanup'
func (*MockCleanupAction_Cleanup_Call) Return ¶
func (_c *MockCleanupAction_Cleanup_Call) Return(_a0 error) *MockCleanupAction_Cleanup_Call
func (*MockCleanupAction_Cleanup_Call) Run ¶
func (_c *MockCleanupAction_Cleanup_Call) Run(run func(ctx *contexts.Context)) *MockCleanupAction_Cleanup_Call
func (*MockCleanupAction_Cleanup_Call) RunAndReturn ¶
func (_c *MockCleanupAction_Cleanup_Call) RunAndReturn(run func(*contexts.Context) error) *MockCleanupAction_Cleanup_Call
type MockCleanupAction_Execute_Call ¶
MockCleanupAction_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'
func (*MockCleanupAction_Execute_Call) Return ¶
func (_c *MockCleanupAction_Execute_Call) Return(_a0 error) *MockCleanupAction_Execute_Call
func (*MockCleanupAction_Execute_Call) Run ¶
func (_c *MockCleanupAction_Execute_Call) Run(run func(ctx *contexts.Context, backupToolClient clients.ClientInterface)) *MockCleanupAction_Execute_Call
func (*MockCleanupAction_Execute_Call) RunAndReturn ¶
func (_c *MockCleanupAction_Execute_Call) RunAndReturn(run func(*contexts.Context, clients.ClientInterface) error) *MockCleanupAction_Execute_Call
type MockCleanupAction_Expecter ¶
type MockCleanupAction_Expecter struct {
// contains filtered or unexported fields
}
func (*MockCleanupAction_Expecter) Cleanup ¶
func (_e *MockCleanupAction_Expecter) Cleanup(ctx interface{}) *MockCleanupAction_Cleanup_Call
Cleanup is a helper method to define mock.On call
- ctx *contexts.Context
func (*MockCleanupAction_Expecter) Execute ¶
func (_e *MockCleanupAction_Expecter) Execute(ctx interface{}, backupToolClient interface{}) *MockCleanupAction_Execute_Call
Execute is a helper method to define mock.On call
- ctx *contexts.Context
- backupToolClient clients.ClientInterface
func (*MockCleanupAction_Expecter) Setup ¶
func (_e *MockCleanupAction_Expecter) Setup(ctx interface{}, btiOpts interface{}) *MockCleanupAction_Setup_Call
Setup is a helper method to define mock.On call
- ctx *contexts.Context
- btiOpts *backuptoolinstance.CreateBackupToolInstanceOptions
func (*MockCleanupAction_Expecter) Validate ¶
func (_e *MockCleanupAction_Expecter) Validate(ctx interface{}) *MockCleanupAction_Validate_Call
Validate is a helper method to define mock.On call
- ctx *contexts.Context
type MockCleanupAction_Setup_Call ¶
MockCleanupAction_Setup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Setup'
func (*MockCleanupAction_Setup_Call) Return ¶
func (_c *MockCleanupAction_Setup_Call) Return(_a0 error) *MockCleanupAction_Setup_Call
func (*MockCleanupAction_Setup_Call) Run ¶
func (_c *MockCleanupAction_Setup_Call) Run(run func(ctx *contexts.Context, btiOpts *backuptoolinstance.CreateBackupToolInstanceOptions)) *MockCleanupAction_Setup_Call
func (*MockCleanupAction_Setup_Call) RunAndReturn ¶
func (_c *MockCleanupAction_Setup_Call) RunAndReturn(run func(*contexts.Context, *backuptoolinstance.CreateBackupToolInstanceOptions) error) *MockCleanupAction_Setup_Call
type MockCleanupAction_Validate_Call ¶
MockCleanupAction_Validate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Validate'
func (*MockCleanupAction_Validate_Call) Return ¶
func (_c *MockCleanupAction_Validate_Call) Return(_a0 error) *MockCleanupAction_Validate_Call
func (*MockCleanupAction_Validate_Call) Run ¶
func (_c *MockCleanupAction_Validate_Call) Run(run func(ctx *contexts.Context)) *MockCleanupAction_Validate_Call
func (*MockCleanupAction_Validate_Call) RunAndReturn ¶
func (_c *MockCleanupAction_Validate_Call) RunAndReturn(run func(*contexts.Context) error) *MockCleanupAction_Validate_Call
type MockRemoteAction ¶
MockRemoteAction is an autogenerated mock type for the RemoteAction type
func NewMockRemoteAction ¶
func NewMockRemoteAction(t interface {
mock.TestingT
Cleanup(func())
}) *MockRemoteAction
NewMockRemoteAction creates a new instance of MockRemoteAction. 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 (*MockRemoteAction) EXPECT ¶
func (_m *MockRemoteAction) EXPECT() *MockRemoteAction_Expecter
func (*MockRemoteAction) Execute ¶
func (_m *MockRemoteAction) Execute(ctx *contexts.Context, backupToolClient clients.ClientInterface) error
Execute provides a mock function with given fields: ctx, backupToolClient
func (*MockRemoteAction) Setup ¶
func (_m *MockRemoteAction) Setup(ctx *contexts.Context, btiOpts *backuptoolinstance.CreateBackupToolInstanceOptions) error
Setup provides a mock function with given fields: ctx, btiOpts
type MockRemoteAction_Execute_Call ¶
MockRemoteAction_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'
func (*MockRemoteAction_Execute_Call) Return ¶
func (_c *MockRemoteAction_Execute_Call) Return(_a0 error) *MockRemoteAction_Execute_Call
func (*MockRemoteAction_Execute_Call) Run ¶
func (_c *MockRemoteAction_Execute_Call) Run(run func(ctx *contexts.Context, backupToolClient clients.ClientInterface)) *MockRemoteAction_Execute_Call
func (*MockRemoteAction_Execute_Call) RunAndReturn ¶
func (_c *MockRemoteAction_Execute_Call) RunAndReturn(run func(*contexts.Context, clients.ClientInterface) error) *MockRemoteAction_Execute_Call
type MockRemoteAction_Expecter ¶
type MockRemoteAction_Expecter struct {
// contains filtered or unexported fields
}
func (*MockRemoteAction_Expecter) Execute ¶
func (_e *MockRemoteAction_Expecter) Execute(ctx interface{}, backupToolClient interface{}) *MockRemoteAction_Execute_Call
Execute is a helper method to define mock.On call
- ctx *contexts.Context
- backupToolClient clients.ClientInterface
func (*MockRemoteAction_Expecter) Setup ¶
func (_e *MockRemoteAction_Expecter) Setup(ctx interface{}, btiOpts interface{}) *MockRemoteAction_Setup_Call
Setup is a helper method to define mock.On call
- ctx *contexts.Context
- btiOpts *backuptoolinstance.CreateBackupToolInstanceOptions
func (*MockRemoteAction_Expecter) Validate ¶
func (_e *MockRemoteAction_Expecter) Validate(ctx interface{}) *MockRemoteAction_Validate_Call
Validate is a helper method to define mock.On call
- ctx *contexts.Context
type MockRemoteAction_Setup_Call ¶
MockRemoteAction_Setup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Setup'
func (*MockRemoteAction_Setup_Call) Return ¶
func (_c *MockRemoteAction_Setup_Call) Return(_a0 error) *MockRemoteAction_Setup_Call
func (*MockRemoteAction_Setup_Call) Run ¶
func (_c *MockRemoteAction_Setup_Call) Run(run func(ctx *contexts.Context, btiOpts *backuptoolinstance.CreateBackupToolInstanceOptions)) *MockRemoteAction_Setup_Call
func (*MockRemoteAction_Setup_Call) RunAndReturn ¶
func (_c *MockRemoteAction_Setup_Call) RunAndReturn(run func(*contexts.Context, *backuptoolinstance.CreateBackupToolInstanceOptions) error) *MockRemoteAction_Setup_Call
type MockRemoteAction_Validate_Call ¶
MockRemoteAction_Validate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Validate'
func (*MockRemoteAction_Validate_Call) Return ¶
func (_c *MockRemoteAction_Validate_Call) Return(_a0 error) *MockRemoteAction_Validate_Call
func (*MockRemoteAction_Validate_Call) Run ¶
func (_c *MockRemoteAction_Validate_Call) Run(run func(ctx *contexts.Context)) *MockRemoteAction_Validate_Call
func (*MockRemoteAction_Validate_Call) RunAndReturn ¶
func (_c *MockRemoteAction_Validate_Call) RunAndReturn(run func(*contexts.Context) error) *MockRemoteAction_Validate_Call
type MockRemoteStageInterface ¶
MockRemoteStageInterface is an autogenerated mock type for the RemoteStageInterface type
func NewMockRemoteStageInterface ¶
func NewMockRemoteStageInterface(t interface {
mock.TestingT
Cleanup(func())
}) *MockRemoteStageInterface
NewMockRemoteStageInterface creates a new instance of MockRemoteStageInterface. 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 (*MockRemoteStageInterface) EXPECT ¶
func (_m *MockRemoteStageInterface) EXPECT() *MockRemoteStageInterface_Expecter
func (*MockRemoteStageInterface) Run ¶
func (_m *MockRemoteStageInterface) Run(ctx *contexts.Context) error
Run provides a mock function with given fields: ctx
func (*MockRemoteStageInterface) WithAction ¶
func (_m *MockRemoteStageInterface) WithAction(friendlyName string, action RemoteAction) RemoteStageInterface
WithAction provides a mock function with given fields: friendlyName, action
type MockRemoteStageInterface_Expecter ¶
type MockRemoteStageInterface_Expecter struct {
// contains filtered or unexported fields
}
func (*MockRemoteStageInterface_Expecter) Run ¶
func (_e *MockRemoteStageInterface_Expecter) Run(ctx interface{}) *MockRemoteStageInterface_Run_Call
Run is a helper method to define mock.On call
- ctx *contexts.Context
func (*MockRemoteStageInterface_Expecter) WithAction ¶
func (_e *MockRemoteStageInterface_Expecter) WithAction(friendlyName interface{}, action interface{}) *MockRemoteStageInterface_WithAction_Call
WithAction is a helper method to define mock.On call
- friendlyName string
- action RemoteAction
type MockRemoteStageInterface_Run_Call ¶
MockRemoteStageInterface_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run'
func (*MockRemoteStageInterface_Run_Call) Return ¶
func (_c *MockRemoteStageInterface_Run_Call) Return(_a0 error) *MockRemoteStageInterface_Run_Call
func (*MockRemoteStageInterface_Run_Call) Run ¶
func (_c *MockRemoteStageInterface_Run_Call) Run(run func(ctx *contexts.Context)) *MockRemoteStageInterface_Run_Call
func (*MockRemoteStageInterface_Run_Call) RunAndReturn ¶
func (_c *MockRemoteStageInterface_Run_Call) RunAndReturn(run func(*contexts.Context) error) *MockRemoteStageInterface_Run_Call
type MockRemoteStageInterface_WithAction_Call ¶
MockRemoteStageInterface_WithAction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithAction'
func (*MockRemoteStageInterface_WithAction_Call) Return ¶
func (_c *MockRemoteStageInterface_WithAction_Call) Return(_a0 RemoteStageInterface) *MockRemoteStageInterface_WithAction_Call
func (*MockRemoteStageInterface_WithAction_Call) Run ¶
func (_c *MockRemoteStageInterface_WithAction_Call) Run(run func(friendlyName string, action RemoteAction)) *MockRemoteStageInterface_WithAction_Call
func (*MockRemoteStageInterface_WithAction_Call) RunAndReturn ¶
func (_c *MockRemoteStageInterface_WithAction_Call) RunAndReturn(run func(string, RemoteAction) RemoteStageInterface) *MockRemoteStageInterface_WithAction_Call
type PreConsistencyPointAction ¶ added in v0.0.13
type PreConsistencyPointAction interface {
RemoteAction
BeforeConsistencyPoint(ctx *contexts.Context) error
}
PreConsistencyPointAction is an optional capability of a RemoteAction that has work to do before the stage establishes the event's shared consistency point — the single instant the whole DR event is made recoverable to. The canonical example is a database capture taking its base backup, which must complete before the non-database captures so the database's recoverable state precedes them. The stage runs BeforeConsistencyPoint on every such action first; once they all finish it stamps the consistency point (the current time) and hands it to each ConsistencyPointConsumer. Any future action needing a pre-consistency-point step can implement this without changing the stage.
type RemoteAction ¶
type RemoteStage ¶
type RemoteStage struct {
// contains filtered or unexported fields
}
func (*RemoteStage) Run ¶
func (rs *RemoteStage) Run(ctx *contexts.Context) (err error)
Runs each part of each action in the configured stage. Handles all cleanup.
func (*RemoteStage) WithAction ¶
func (rs *RemoteStage) WithAction(friendlyName string, action RemoteAction) RemoteStageInterface
type RemoteStageInterface ¶
type RemoteStageInterface interface {
WithAction(friendlyName string, action RemoteAction) RemoteStageInterface
Run(ctx *contexts.Context) error
}
func NewRemoteStage ¶
func NewRemoteStage(kubeClusterClient kubecluster.ClientInterface, namespace, eventName string, opts RemoteStageOptions) RemoteStageInterface
type RemoteStageOptions ¶
type RemoteStageOptions struct {
CleanupTimeout helpers.MaxWaitTime `yaml:"cleanupTimeout,omitempty"`
}