remote

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

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

type ConsistencyPointConsumer interface {
	SetConsistencyPoint(c time.Time)
}

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

type MockCleanupAction struct {
	mock.Mock
}

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 (*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

Setup provides a mock function with given fields: ctx, btiOpts

func (*MockCleanupAction) Validate

func (_m *MockCleanupAction) Validate(ctx *contexts.Context) error

Validate provides a mock function with given fields: ctx

type MockCleanupAction_Cleanup_Call

type MockCleanupAction_Cleanup_Call struct {
	*mock.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 (*MockCleanupAction_Cleanup_Call) Run

func (*MockCleanupAction_Cleanup_Call) RunAndReturn

type MockCleanupAction_Execute_Call

type MockCleanupAction_Execute_Call struct {
	*mock.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 (*MockCleanupAction_Execute_Call) Run

func (*MockCleanupAction_Execute_Call) RunAndReturn

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

type MockCleanupAction_Setup_Call struct {
	*mock.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 (*MockCleanupAction_Setup_Call) Run

type MockCleanupAction_Validate_Call

type MockCleanupAction_Validate_Call struct {
	*mock.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 (*MockCleanupAction_Validate_Call) Run

func (*MockCleanupAction_Validate_Call) RunAndReturn

type MockRemoteAction

type MockRemoteAction struct {
	mock.Mock
}

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 (*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

Setup provides a mock function with given fields: ctx, btiOpts

func (*MockRemoteAction) Validate

func (_m *MockRemoteAction) Validate(ctx *contexts.Context) error

Validate provides a mock function with given fields: ctx

type MockRemoteAction_Execute_Call

type MockRemoteAction_Execute_Call struct {
	*mock.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 (*MockRemoteAction_Execute_Call) Run

func (*MockRemoteAction_Execute_Call) RunAndReturn

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

type MockRemoteAction_Setup_Call struct {
	*mock.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 (*MockRemoteAction_Setup_Call) Run

type MockRemoteAction_Validate_Call

type MockRemoteAction_Validate_Call struct {
	*mock.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 (*MockRemoteAction_Validate_Call) Run

func (*MockRemoteAction_Validate_Call) RunAndReturn

type MockRemoteStageInterface

type MockRemoteStageInterface struct {
	mock.Mock
}

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 (*MockRemoteStageInterface) Run

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

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

type MockRemoteStageInterface_Run_Call struct {
	*mock.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 (*MockRemoteStageInterface_Run_Call) Run

func (*MockRemoteStageInterface_Run_Call) RunAndReturn

type MockRemoteStageInterface_WithAction_Call

type MockRemoteStageInterface_WithAction_Call struct {
	*mock.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 (*MockRemoteStageInterface_WithAction_Call) Run

func (*MockRemoteStageInterface_WithAction_Call) RunAndReturn

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 RemoteAction interface {
	Validate(ctx *contexts.Context) error
	Setup(ctx *contexts.Context, btiOpts *bti.CreateBackupToolInstanceOptions) error
	Execute(ctx *contexts.Context, backupToolClient clients.ClientInterface) error
}

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"`
}

Directories

Path Synopsis
cnpg

Jump to

Keyboard shortcuts

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