sync_activity

package
v0.4.69 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: MIT Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Activity

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

func New

func New(
	connclient mgmtv1alpha1connect.ConnectionServiceClient,
	jobclient mgmtv1alpha1connect.JobServiceClient,
	tunnelmanagermap *sync.Map,
	temporalclient client.Client,
	meter metric.Meter,
	benthosStreamManager BenthosStreamManagerClient,
	disableReaper bool,
) *Activity

func (*Activity) Sync

func (a *Activity) Sync(ctx context.Context, req *SyncRequest, metadata *SyncMetadata) (*SyncResponse, error)

Temporal activity that runs benthos and syncs a source connection to one or more destination connections

type BenthosStreamAdapter

type BenthosStreamAdapter struct {
	Stream *service.Stream
}

func NewBenthosStreamAdapter

func NewBenthosStreamAdapter(stream *service.Stream) *BenthosStreamAdapter

func (*BenthosStreamAdapter) Run

func (*BenthosStreamAdapter) Stop

func (*BenthosStreamAdapter) StopWithin

func (b *BenthosStreamAdapter) StopWithin(d time.Duration) error

type BenthosStreamClient

type BenthosStreamClient interface {
	Run(ctx context.Context) error
	Stop(ctx context.Context) error
	StopWithin(d time.Duration) error
}

type BenthosStreamManager

type BenthosStreamManager struct{}

func NewBenthosStreamManager

func NewBenthosStreamManager() *BenthosStreamManager

func (*BenthosStreamManager) NewBenthosStreamFromBuilder

func (b *BenthosStreamManager) NewBenthosStreamFromBuilder(streambldr *service.StreamBuilder) (BenthosStreamClient, error)

type BenthosStreamManagerClient

type BenthosStreamManagerClient interface {
	NewBenthosStreamFromBuilder(streambldr *service.StreamBuilder) (BenthosStreamClient, error)
}

type MockBenthosStreamClient

type MockBenthosStreamClient struct {
	mock.Mock
}

MockBenthosStreamClient is an autogenerated mock type for the BenthosStreamClient type

func NewMockBenthosStreamClient

func NewMockBenthosStreamClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockBenthosStreamClient

NewMockBenthosStreamClient creates a new instance of MockBenthosStreamClient. 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 (*MockBenthosStreamClient) EXPECT

func (*MockBenthosStreamClient) Run

Run provides a mock function with given fields: ctx

func (*MockBenthosStreamClient) Stop

Stop provides a mock function with given fields: ctx

func (*MockBenthosStreamClient) StopWithin

func (_m *MockBenthosStreamClient) StopWithin(d time.Duration) error

StopWithin provides a mock function with given fields: d

type MockBenthosStreamClient_Expecter

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

func (*MockBenthosStreamClient_Expecter) Run

Run is a helper method to define mock.On call

  • ctx context.Context

func (*MockBenthosStreamClient_Expecter) Stop

Stop is a helper method to define mock.On call

  • ctx context.Context

func (*MockBenthosStreamClient_Expecter) StopWithin

StopWithin is a helper method to define mock.On call

  • d time.Duration

type MockBenthosStreamClient_Run_Call

type MockBenthosStreamClient_Run_Call struct {
	*mock.Call
}

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

func (*MockBenthosStreamClient_Run_Call) Return

func (*MockBenthosStreamClient_Run_Call) Run

func (*MockBenthosStreamClient_Run_Call) RunAndReturn

type MockBenthosStreamClient_StopWithin_Call

type MockBenthosStreamClient_StopWithin_Call struct {
	*mock.Call
}

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

func (*MockBenthosStreamClient_StopWithin_Call) Return

func (*MockBenthosStreamClient_StopWithin_Call) Run

func (*MockBenthosStreamClient_StopWithin_Call) RunAndReturn

type MockBenthosStreamClient_Stop_Call

type MockBenthosStreamClient_Stop_Call struct {
	*mock.Call
}

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

func (*MockBenthosStreamClient_Stop_Call) Return

func (*MockBenthosStreamClient_Stop_Call) Run

func (*MockBenthosStreamClient_Stop_Call) RunAndReturn

type MockBenthosStreamManagerClient

type MockBenthosStreamManagerClient struct {
	mock.Mock
}

MockBenthosStreamManagerClient is an autogenerated mock type for the BenthosStreamManagerClient type

func NewMockBenthosStreamManagerClient

func NewMockBenthosStreamManagerClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockBenthosStreamManagerClient

NewMockBenthosStreamManagerClient creates a new instance of MockBenthosStreamManagerClient. 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 (*MockBenthosStreamManagerClient) EXPECT

func (*MockBenthosStreamManagerClient) NewBenthosStreamFromBuilder

func (_m *MockBenthosStreamManagerClient) NewBenthosStreamFromBuilder(streambldr *service.StreamBuilder) (BenthosStreamClient, error)

NewBenthosStreamFromBuilder provides a mock function with given fields: streambldr

type MockBenthosStreamManagerClient_Expecter

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

func (*MockBenthosStreamManagerClient_Expecter) NewBenthosStreamFromBuilder

NewBenthosStreamFromBuilder is a helper method to define mock.On call

  • streambldr *service.StreamBuilder

type MockBenthosStreamManagerClient_NewBenthosStreamFromBuilder_Call

type MockBenthosStreamManagerClient_NewBenthosStreamFromBuilder_Call struct {
	*mock.Call
}

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

func (*MockBenthosStreamManagerClient_NewBenthosStreamFromBuilder_Call) Return

func (*MockBenthosStreamManagerClient_NewBenthosStreamFromBuilder_Call) Run

type SyncMetadata

type SyncMetadata struct {
	Schema string
	Table  string
}

type SyncRequest

type SyncRequest struct {
	// Deprecated
	BenthosConfig string
	BenthosDsns   []*shared.BenthosDsn
	// Identifier that is used in combination with the AccountId to retrieve the benthos config
	Name      string
	AccountId string
}

type SyncResponse

type SyncResponse struct {
	Schema string
	Table  string
}

Jump to

Keyboard shortcuts

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