connectiontunnelmanager

package
v0.4.77 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionDetails

type ConnectionDetails interface {
	String() string
}

type ConnectionProvider

type ConnectionProvider[T any] interface {
	GetConnectionClient(connectionConfig *mgmtv1alpha1.ConnectionConfig) (T, error)
	CloseClientConnection(client T) error
}

type ConnectionTunnelManager

type ConnectionTunnelManager[T any] struct {
	// contains filtered or unexported fields
}

func NewConnectionTunnelManager

func NewConnectionTunnelManager[T any](connectionProvider ConnectionProvider[T]) *ConnectionTunnelManager[T]

func (*ConnectionTunnelManager[T]) GetConnection

func (c *ConnectionTunnelManager[T]) GetConnection(
	session string,
	connection *mgmtv1alpha1.Connection,
	logger *slog.Logger,
) (T, error)

func (*ConnectionTunnelManager[T]) Reaper

func (c *ConnectionTunnelManager[T]) Reaper()

func (*ConnectionTunnelManager[T]) ReleaseSession

func (c *ConnectionTunnelManager[T]) ReleaseSession(session string) bool

func (*ConnectionTunnelManager[T]) Shutdown

func (c *ConnectionTunnelManager[T]) Shutdown()

type Interface

type Interface[T any] interface {
	GetConnection(session string, connection *mgmtv1alpha1.Connection, logger *slog.Logger) (T, error)

	ReleaseSession(session string) bool
	Shutdown()
	Reaper()
}

type MockConnectionProvider

type MockConnectionProvider[T any] struct {
	mock.Mock
}

MockConnectionProvider is an autogenerated mock type for the ConnectionProvider type

func NewMockConnectionProvider

func NewMockConnectionProvider[T any](t interface {
	mock.TestingT
	Cleanup(func())
}) *MockConnectionProvider[T]

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]) CloseClientConnection

func (_m *MockConnectionProvider[T]) CloseClientConnection(client T) error

CloseClientConnection provides a mock function with given fields: client

func (*MockConnectionProvider[T]) EXPECT

func (*MockConnectionProvider[T]) GetConnectionClient

func (_m *MockConnectionProvider[T]) GetConnectionClient(connectionConfig *mgmtv1alpha1.ConnectionConfig) (T, error)

GetConnectionClient provides a mock function with given fields: connectionConfig

type MockConnectionProvider_CloseClientConnection_Call

type MockConnectionProvider_CloseClientConnection_Call[T any] 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]) Return

func (*MockConnectionProvider_CloseClientConnection_Call[T]) Run

func (*MockConnectionProvider_CloseClientConnection_Call[T]) RunAndReturn

type MockConnectionProvider_Expecter

type MockConnectionProvider_Expecter[T any] struct {
	// contains filtered or unexported fields
}

func (*MockConnectionProvider_Expecter[T]) CloseClientConnection

func (_e *MockConnectionProvider_Expecter[T]) CloseClientConnection(client interface{}) *MockConnectionProvider_CloseClientConnection_Call[T]

CloseClientConnection is a helper method to define mock.On call

  • client T

func (*MockConnectionProvider_Expecter[T]) GetConnectionClient

func (_e *MockConnectionProvider_Expecter[T]) GetConnectionClient(connectionConfig interface{}) *MockConnectionProvider_GetConnectionClient_Call[T]

GetConnectionClient is a helper method to define mock.On call

  • connectionConfig *mgmtv1alpha1.ConnectionConfig

type MockConnectionProvider_GetConnectionClient_Call

type MockConnectionProvider_GetConnectionClient_Call[T any] 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]) Return

func (*MockConnectionProvider_GetConnectionClient_Call[T]) Run

func (*MockConnectionProvider_GetConnectionClient_Call[T]) RunAndReturn

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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