Documentation ¶
Index ¶
- type ConnectionDetails
- type ConnectionProvider
- type ConnectionTunnelManager
- func (c *ConnectionTunnelManager[T, TConfig]) GetConnection(session string, connection *mgmtv1alpha1.Connection, logger *slog.Logger) (T, error)
- func (c *ConnectionTunnelManager[T, TConfig]) GetConnectionString(session string, connection *mgmtv1alpha1.Connection, logger *slog.Logger) (string, error)
- func (c *ConnectionTunnelManager[T, TConfig]) Reaper()
- func (c *ConnectionTunnelManager[T, TConfig]) ReleaseSession(session string) bool
- func (c *ConnectionTunnelManager[T, TConfig]) Shutdown()
- type Interface
- type MockConnectionProvider
- func (_m *MockConnectionProvider[T, TConfig]) CloseClientConnection(client T) error
- func (_m *MockConnectionProvider[T, TConfig]) EXPECT() *MockConnectionProvider_Expecter[T, TConfig]
- func (_m *MockConnectionProvider[T, TConfig]) GetConnectionClient(driver string, connectionString string, opts TConfig) (T, error)
- func (_m *MockConnectionProvider[T, TConfig]) GetConnectionClientConfig(connectionConfig *mgmtv1alpha1.ConnectionConfig) (TConfig, error)
- func (_m *MockConnectionProvider[T, TConfig]) GetConnectionDetails(connectionConfig *mgmtv1alpha1.ConnectionConfig, connectionTimeout *uint32, ...) (ConnectionDetails, error)
- type MockConnectionProvider_CloseClientConnection_Call
- func (_c *MockConnectionProvider_CloseClientConnection_Call[T, TConfig]) Return(_a0 error) *MockConnectionProvider_CloseClientConnection_Call[T, TConfig]
- func (_c *MockConnectionProvider_CloseClientConnection_Call[T, TConfig]) Run(run func(client T)) *MockConnectionProvider_CloseClientConnection_Call[T, TConfig]
- func (_c *MockConnectionProvider_CloseClientConnection_Call[T, TConfig]) RunAndReturn(run func(T) error) *MockConnectionProvider_CloseClientConnection_Call[T, TConfig]
- type MockConnectionProvider_Expecter
- func (_e *MockConnectionProvider_Expecter[T, TConfig]) CloseClientConnection(client interface{}) *MockConnectionProvider_CloseClientConnection_Call[T, TConfig]
- func (_e *MockConnectionProvider_Expecter[T, TConfig]) GetConnectionClient(driver interface{}, connectionString interface{}, opts interface{}) *MockConnectionProvider_GetConnectionClient_Call[T, TConfig]
- func (_e *MockConnectionProvider_Expecter[T, TConfig]) GetConnectionClientConfig(connectionConfig interface{}) *MockConnectionProvider_GetConnectionClientConfig_Call[T, TConfig]
- func (_e *MockConnectionProvider_Expecter[T, TConfig]) GetConnectionDetails(connectionConfig interface{}, connectionTimeout interface{}, ...) *MockConnectionProvider_GetConnectionDetails_Call[T, TConfig]
- type MockConnectionProvider_GetConnectionClientConfig_Call
- func (_c *MockConnectionProvider_GetConnectionClientConfig_Call[T, TConfig]) Return(_a0 TConfig, _a1 error) *MockConnectionProvider_GetConnectionClientConfig_Call[T, TConfig]
- func (_c *MockConnectionProvider_GetConnectionClientConfig_Call[T, TConfig]) Run(run func(connectionConfig *mgmtv1alpha1.ConnectionConfig)) *MockConnectionProvider_GetConnectionClientConfig_Call[T, TConfig]
- func (_c *MockConnectionProvider_GetConnectionClientConfig_Call[T, TConfig]) RunAndReturn(run func(*mgmtv1alpha1.ConnectionConfig) (TConfig, error)) *MockConnectionProvider_GetConnectionClientConfig_Call[T, TConfig]
- type MockConnectionProvider_GetConnectionClient_Call
- func (_c *MockConnectionProvider_GetConnectionClient_Call[T, TConfig]) Return(_a0 T, _a1 error) *MockConnectionProvider_GetConnectionClient_Call[T, TConfig]
- func (_c *MockConnectionProvider_GetConnectionClient_Call[T, TConfig]) Run(run func(driver string, connectionString string, opts TConfig)) *MockConnectionProvider_GetConnectionClient_Call[T, TConfig]
- func (_c *MockConnectionProvider_GetConnectionClient_Call[T, TConfig]) RunAndReturn(run func(string, string, TConfig) (T, error)) *MockConnectionProvider_GetConnectionClient_Call[T, TConfig]
- type MockConnectionProvider_GetConnectionDetails_Call
- func (_c *MockConnectionProvider_GetConnectionDetails_Call[T, TConfig]) Return(_a0 ConnectionDetails, _a1 error) *MockConnectionProvider_GetConnectionDetails_Call[T, TConfig]
- func (_c *MockConnectionProvider_GetConnectionDetails_Call[T, TConfig]) Run(...) *MockConnectionProvider_GetConnectionDetails_Call[T, TConfig]
- func (_c *MockConnectionProvider_GetConnectionDetails_Call[T, TConfig]) RunAndReturn(...) *MockConnectionProvider_GetConnectionDetails_Call[T, TConfig]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionDetails ¶
type ConnectionProvider ¶
type ConnectionProvider[T any, TConfig any] interface { GetConnectionDetails(connectionConfig *mgmtv1alpha1.ConnectionConfig, connectionTimeout *uint32, logger *slog.Logger) (ConnectionDetails, error) GetConnectionClient(driver string, connectionString string, opts TConfig) (T, error) GetConnectionClientConfig(connectionConfig *mgmtv1alpha1.ConnectionConfig) (TConfig, error) CloseClientConnection(client T) error }
type ConnectionTunnelManager ¶
type ConnectionTunnelManager[T any, TConfig any] struct { // contains filtered or unexported fields }
func NewConnectionTunnelManager ¶
func NewConnectionTunnelManager[T any, TConfig any](connectionProvider ConnectionProvider[T, TConfig]) *ConnectionTunnelManager[T, TConfig]
func (*ConnectionTunnelManager[T, TConfig]) GetConnection ¶
func (c *ConnectionTunnelManager[T, TConfig]) GetConnection( session string, connection *mgmtv1alpha1.Connection, logger *slog.Logger, ) (T, error)
func (*ConnectionTunnelManager[T, TConfig]) GetConnectionString ¶
func (c *ConnectionTunnelManager[T, TConfig]) GetConnectionString( session string, connection *mgmtv1alpha1.Connection, logger *slog.Logger, ) (string, error)
func (*ConnectionTunnelManager[T, TConfig]) Reaper ¶
func (c *ConnectionTunnelManager[T, TConfig]) Reaper()
func (*ConnectionTunnelManager[T, TConfig]) ReleaseSession ¶
func (c *ConnectionTunnelManager[T, TConfig]) ReleaseSession(session string) bool
func (*ConnectionTunnelManager[T, TConfig]) Shutdown ¶
func (c *ConnectionTunnelManager[T, TConfig]) Shutdown()
type Interface ¶
type Interface[T any] interface { GetConnectionString(session string, connection *mgmtv1alpha1.Connection, logger *slog.Logger) (string, error) GetConnection(session string, connection *mgmtv1alpha1.Connection, logger *slog.Logger) (T, error) ReleaseSession(session string) bool Shutdown() Reaper() }
type MockConnectionProvider ¶
MockConnectionProvider is an autogenerated mock type for the ConnectionProvider type
func NewMockConnectionProvider ¶
func NewMockConnectionProvider[T interface{}, TConfig interface{}](t interface { mock.TestingT Cleanup(func()) }) *MockConnectionProvider[T, TConfig]
NewMockConnectionProvider creates a new instance of MockConnectionProvider. 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 (*MockConnectionProvider[T, TConfig]) CloseClientConnection ¶
func (_m *MockConnectionProvider[T, TConfig]) CloseClientConnection(client T) error
CloseClientConnection provides a mock function with given fields: client
func (*MockConnectionProvider[T, TConfig]) EXPECT ¶
func (_m *MockConnectionProvider[T, TConfig]) EXPECT() *MockConnectionProvider_Expecter[T, TConfig]
func (*MockConnectionProvider[T, TConfig]) GetConnectionClient ¶
func (_m *MockConnectionProvider[T, TConfig]) GetConnectionClient(driver string, connectionString string, opts TConfig) (T, error)
GetConnectionClient provides a mock function with given fields: driver, connectionString, opts
func (*MockConnectionProvider[T, TConfig]) GetConnectionClientConfig ¶
func (_m *MockConnectionProvider[T, TConfig]) GetConnectionClientConfig(connectionConfig *mgmtv1alpha1.ConnectionConfig) (TConfig, error)
GetConnectionClientConfig provides a mock function with given fields: connectionConfig
func (*MockConnectionProvider[T, TConfig]) GetConnectionDetails ¶
func (_m *MockConnectionProvider[T, TConfig]) GetConnectionDetails(connectionConfig *mgmtv1alpha1.ConnectionConfig, connectionTimeout *uint32, logger *slog.Logger) (ConnectionDetails, error)
GetConnectionDetails provides a mock function with given fields: connectionConfig, connectionTimeout, logger
type MockConnectionProvider_CloseClientConnection_Call ¶
type MockConnectionProvider_CloseClientConnection_Call[T interface{}, TConfig interface{}] struct {
*mock.Call
}
MockConnectionProvider_CloseClientConnection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CloseClientConnection'
func (*MockConnectionProvider_CloseClientConnection_Call[T, TConfig]) Return ¶
func (_c *MockConnectionProvider_CloseClientConnection_Call[T, TConfig]) Return(_a0 error) *MockConnectionProvider_CloseClientConnection_Call[T, TConfig]
func (*MockConnectionProvider_CloseClientConnection_Call[T, TConfig]) Run ¶
func (_c *MockConnectionProvider_CloseClientConnection_Call[T, TConfig]) Run(run func(client T)) *MockConnectionProvider_CloseClientConnection_Call[T, TConfig]
func (*MockConnectionProvider_CloseClientConnection_Call[T, TConfig]) RunAndReturn ¶
func (_c *MockConnectionProvider_CloseClientConnection_Call[T, TConfig]) RunAndReturn(run func(T) error) *MockConnectionProvider_CloseClientConnection_Call[T, TConfig]
type MockConnectionProvider_Expecter ¶
type MockConnectionProvider_Expecter[T interface{}, TConfig interface{}] struct {
// contains filtered or unexported fields
}
func (*MockConnectionProvider_Expecter[T, TConfig]) CloseClientConnection ¶
func (_e *MockConnectionProvider_Expecter[T, TConfig]) CloseClientConnection(client interface{}) *MockConnectionProvider_CloseClientConnection_Call[T, TConfig]
CloseClientConnection is a helper method to define mock.On call
- client T
func (*MockConnectionProvider_Expecter[T, TConfig]) GetConnectionClient ¶
func (_e *MockConnectionProvider_Expecter[T, TConfig]) GetConnectionClient(driver interface{}, connectionString interface{}, opts interface{}) *MockConnectionProvider_GetConnectionClient_Call[T, TConfig]
GetConnectionClient is a helper method to define mock.On call
- driver string
- connectionString string
- opts TConfig
func (*MockConnectionProvider_Expecter[T, TConfig]) GetConnectionClientConfig ¶
func (_e *MockConnectionProvider_Expecter[T, TConfig]) GetConnectionClientConfig(connectionConfig interface{}) *MockConnectionProvider_GetConnectionClientConfig_Call[T, TConfig]
GetConnectionClientConfig is a helper method to define mock.On call
- connectionConfig *mgmtv1alpha1.ConnectionConfig
func (*MockConnectionProvider_Expecter[T, TConfig]) GetConnectionDetails ¶
func (_e *MockConnectionProvider_Expecter[T, TConfig]) GetConnectionDetails(connectionConfig interface{}, connectionTimeout interface{}, logger interface{}) *MockConnectionProvider_GetConnectionDetails_Call[T, TConfig]
GetConnectionDetails is a helper method to define mock.On call
- connectionConfig *mgmtv1alpha1.ConnectionConfig
- connectionTimeout *uint32
- logger *slog.Logger
type MockConnectionProvider_GetConnectionClientConfig_Call ¶
type MockConnectionProvider_GetConnectionClientConfig_Call[T interface{}, TConfig interface{}] struct {
*mock.Call
}
MockConnectionProvider_GetConnectionClientConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConnectionClientConfig'
func (*MockConnectionProvider_GetConnectionClientConfig_Call[T, TConfig]) Return ¶
func (_c *MockConnectionProvider_GetConnectionClientConfig_Call[T, TConfig]) Return(_a0 TConfig, _a1 error) *MockConnectionProvider_GetConnectionClientConfig_Call[T, TConfig]
func (*MockConnectionProvider_GetConnectionClientConfig_Call[T, TConfig]) Run ¶
func (_c *MockConnectionProvider_GetConnectionClientConfig_Call[T, TConfig]) Run(run func(connectionConfig *mgmtv1alpha1.ConnectionConfig)) *MockConnectionProvider_GetConnectionClientConfig_Call[T, TConfig]
func (*MockConnectionProvider_GetConnectionClientConfig_Call[T, TConfig]) RunAndReturn ¶
func (_c *MockConnectionProvider_GetConnectionClientConfig_Call[T, TConfig]) RunAndReturn(run func(*mgmtv1alpha1.ConnectionConfig) (TConfig, error)) *MockConnectionProvider_GetConnectionClientConfig_Call[T, TConfig]
type MockConnectionProvider_GetConnectionClient_Call ¶
type MockConnectionProvider_GetConnectionClient_Call[T interface{}, TConfig interface{}] struct {
*mock.Call
}
MockConnectionProvider_GetConnectionClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConnectionClient'
func (*MockConnectionProvider_GetConnectionClient_Call[T, TConfig]) Return ¶
func (_c *MockConnectionProvider_GetConnectionClient_Call[T, TConfig]) Return(_a0 T, _a1 error) *MockConnectionProvider_GetConnectionClient_Call[T, TConfig]
func (*MockConnectionProvider_GetConnectionClient_Call[T, TConfig]) Run ¶
func (_c *MockConnectionProvider_GetConnectionClient_Call[T, TConfig]) Run(run func(driver string, connectionString string, opts TConfig)) *MockConnectionProvider_GetConnectionClient_Call[T, TConfig]
func (*MockConnectionProvider_GetConnectionClient_Call[T, TConfig]) RunAndReturn ¶
func (_c *MockConnectionProvider_GetConnectionClient_Call[T, TConfig]) RunAndReturn(run func(string, string, TConfig) (T, error)) *MockConnectionProvider_GetConnectionClient_Call[T, TConfig]
type MockConnectionProvider_GetConnectionDetails_Call ¶
type MockConnectionProvider_GetConnectionDetails_Call[T interface{}, TConfig interface{}] struct {
*mock.Call
}
MockConnectionProvider_GetConnectionDetails_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetConnectionDetails'
func (*MockConnectionProvider_GetConnectionDetails_Call[T, TConfig]) Return ¶
func (_c *MockConnectionProvider_GetConnectionDetails_Call[T, TConfig]) Return(_a0 ConnectionDetails, _a1 error) *MockConnectionProvider_GetConnectionDetails_Call[T, TConfig]
func (*MockConnectionProvider_GetConnectionDetails_Call[T, TConfig]) Run ¶
func (_c *MockConnectionProvider_GetConnectionDetails_Call[T, TConfig]) Run(run func(connectionConfig *mgmtv1alpha1.ConnectionConfig, connectionTimeout *uint32, logger *slog.Logger)) *MockConnectionProvider_GetConnectionDetails_Call[T, TConfig]
func (*MockConnectionProvider_GetConnectionDetails_Call[T, TConfig]) RunAndReturn ¶
func (_c *MockConnectionProvider_GetConnectionDetails_Call[T, TConfig]) RunAndReturn(run func(*mgmtv1alpha1.ConnectionConfig, *uint32, *slog.Logger) (ConnectionDetails, error)) *MockConnectionProvider_GetConnectionDetails_Call[T, TConfig]