Documentation
¶
Overview ¶
Package agentconnmock is a generated GoMock package.
Package agentconnmock contains a mock implementation of workspacesdk.AgentConn for use in tests.
Index ¶
- type MockAgentConn
- func (m *MockAgentConn) AwaitReachable(ctx context.Context) bool
- func (m *MockAgentConn) Close() error
- func (m *MockAgentConn) DebugLogs(ctx context.Context) ([]byte, error)
- func (m *MockAgentConn) DebugMagicsock(ctx context.Context) ([]byte, error)
- func (m *MockAgentConn) DebugManifest(ctx context.Context) ([]byte, error)
- func (m *MockAgentConn) DialContext(ctx context.Context, network, addr string) (net.Conn, error)
- func (m *MockAgentConn) EXPECT() *MockAgentConnMockRecorder
- func (m *MockAgentConn) GetPeerDiagnostics() tailnet.PeerDiagnostics
- func (m *MockAgentConn) ListContainers(ctx context.Context) (codersdk.WorkspaceAgentListContainersResponse, error)
- func (m *MockAgentConn) ListeningPorts(ctx context.Context) (codersdk.WorkspaceAgentListeningPortsResponse, error)
- func (m *MockAgentConn) Netcheck(ctx context.Context) (healthsdk.AgentNetcheckReport, error)
- func (m *MockAgentConn) Ping(ctx context.Context) (time.Duration, bool, *ipnstate.PingResult, error)
- func (m *MockAgentConn) PrometheusMetrics(ctx context.Context) ([]byte, error)
- func (m *MockAgentConn) ReconnectingPTY(ctx context.Context, id uuid.UUID, height, width uint16, command string, ...) (net.Conn, error)
- func (m *MockAgentConn) RecreateDevcontainer(ctx context.Context, devcontainerID string) (codersdk.Response, error)
- func (m *MockAgentConn) SSH(ctx context.Context) (*gonet.TCPConn, error)
- func (m *MockAgentConn) SSHClient(ctx context.Context) (*ssh.Client, error)
- func (m *MockAgentConn) SSHClientOnPort(ctx context.Context, port uint16) (*ssh.Client, error)
- func (m *MockAgentConn) SSHOnPort(ctx context.Context, port uint16) (*gonet.TCPConn, error)
- func (m *MockAgentConn) Speedtest(ctx context.Context, direction speedtest.Direction, duration time.Duration) ([]speedtest.Result, error)
- func (m *MockAgentConn) TailnetConn() *tailnet.Conn
- func (m *MockAgentConn) WatchContainers(ctx context.Context, logger slog.Logger) (<-chan codersdk.WorkspaceAgentListContainersResponse, io.Closer, error)
- type MockAgentConnMockRecorder
- func (mr *MockAgentConnMockRecorder) AwaitReachable(ctx any) *gomock.Call
- func (mr *MockAgentConnMockRecorder) Close() *gomock.Call
- func (mr *MockAgentConnMockRecorder) DebugLogs(ctx any) *gomock.Call
- func (mr *MockAgentConnMockRecorder) DebugMagicsock(ctx any) *gomock.Call
- func (mr *MockAgentConnMockRecorder) DebugManifest(ctx any) *gomock.Call
- func (mr *MockAgentConnMockRecorder) DialContext(ctx, network, addr any) *gomock.Call
- func (mr *MockAgentConnMockRecorder) GetPeerDiagnostics() *gomock.Call
- func (mr *MockAgentConnMockRecorder) ListContainers(ctx any) *gomock.Call
- func (mr *MockAgentConnMockRecorder) ListeningPorts(ctx any) *gomock.Call
- func (mr *MockAgentConnMockRecorder) Netcheck(ctx any) *gomock.Call
- func (mr *MockAgentConnMockRecorder) Ping(ctx any) *gomock.Call
- func (mr *MockAgentConnMockRecorder) PrometheusMetrics(ctx any) *gomock.Call
- func (mr *MockAgentConnMockRecorder) ReconnectingPTY(ctx, id, height, width, command any, initOpts ...any) *gomock.Call
- func (mr *MockAgentConnMockRecorder) RecreateDevcontainer(ctx, devcontainerID any) *gomock.Call
- func (mr *MockAgentConnMockRecorder) SSH(ctx any) *gomock.Call
- func (mr *MockAgentConnMockRecorder) SSHClient(ctx any) *gomock.Call
- func (mr *MockAgentConnMockRecorder) SSHClientOnPort(ctx, port any) *gomock.Call
- func (mr *MockAgentConnMockRecorder) SSHOnPort(ctx, port any) *gomock.Call
- func (mr *MockAgentConnMockRecorder) Speedtest(ctx, direction, duration any) *gomock.Call
- func (mr *MockAgentConnMockRecorder) TailnetConn() *gomock.Call
- func (mr *MockAgentConnMockRecorder) WatchContainers(ctx, logger any) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockAgentConn ¶
type MockAgentConn struct {
// contains filtered or unexported fields
}
MockAgentConn is a mock of AgentConn interface.
func NewMockAgentConn ¶
func NewMockAgentConn(ctrl *gomock.Controller) *MockAgentConn
NewMockAgentConn creates a new mock instance.
func (*MockAgentConn) AwaitReachable ¶
func (m *MockAgentConn) AwaitReachable(ctx context.Context) bool
AwaitReachable mocks base method.
func (*MockAgentConn) DebugLogs ¶
func (m *MockAgentConn) DebugLogs(ctx context.Context) ([]byte, error)
DebugLogs mocks base method.
func (*MockAgentConn) DebugMagicsock ¶
func (m *MockAgentConn) DebugMagicsock(ctx context.Context) ([]byte, error)
DebugMagicsock mocks base method.
func (*MockAgentConn) DebugManifest ¶
func (m *MockAgentConn) DebugManifest(ctx context.Context) ([]byte, error)
DebugManifest mocks base method.
func (*MockAgentConn) DialContext ¶
DialContext mocks base method.
func (*MockAgentConn) EXPECT ¶
func (m *MockAgentConn) EXPECT() *MockAgentConnMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockAgentConn) GetPeerDiagnostics ¶
func (m *MockAgentConn) GetPeerDiagnostics() tailnet.PeerDiagnostics
GetPeerDiagnostics mocks base method.
func (*MockAgentConn) ListContainers ¶
func (m *MockAgentConn) ListContainers(ctx context.Context) (codersdk.WorkspaceAgentListContainersResponse, error)
ListContainers mocks base method.
func (*MockAgentConn) ListeningPorts ¶
func (m *MockAgentConn) ListeningPorts(ctx context.Context) (codersdk.WorkspaceAgentListeningPortsResponse, error)
ListeningPorts mocks base method.
func (*MockAgentConn) Netcheck ¶
func (m *MockAgentConn) Netcheck(ctx context.Context) (healthsdk.AgentNetcheckReport, error)
Netcheck mocks base method.
func (*MockAgentConn) Ping ¶
func (m *MockAgentConn) Ping(ctx context.Context) (time.Duration, bool, *ipnstate.PingResult, error)
Ping mocks base method.
func (*MockAgentConn) PrometheusMetrics ¶
func (m *MockAgentConn) PrometheusMetrics(ctx context.Context) ([]byte, error)
PrometheusMetrics mocks base method.
func (*MockAgentConn) ReconnectingPTY ¶
func (m *MockAgentConn) ReconnectingPTY(ctx context.Context, id uuid.UUID, height, width uint16, command string, initOpts ...workspacesdk.AgentReconnectingPTYInitOption) (net.Conn, error)
ReconnectingPTY mocks base method.
func (*MockAgentConn) RecreateDevcontainer ¶
func (m *MockAgentConn) RecreateDevcontainer(ctx context.Context, devcontainerID string) (codersdk.Response, error)
RecreateDevcontainer mocks base method.
func (*MockAgentConn) SSHClientOnPort ¶
SSHClientOnPort mocks base method.
func (*MockAgentConn) Speedtest ¶
func (m *MockAgentConn) Speedtest(ctx context.Context, direction speedtest.Direction, duration time.Duration) ([]speedtest.Result, error)
Speedtest mocks base method.
func (*MockAgentConn) TailnetConn ¶
func (m *MockAgentConn) TailnetConn() *tailnet.Conn
TailnetConn mocks base method.
func (*MockAgentConn) WatchContainers ¶
func (m *MockAgentConn) WatchContainers(ctx context.Context, logger slog.Logger) (<-chan codersdk.WorkspaceAgentListContainersResponse, io.Closer, error)
WatchContainers mocks base method.
type MockAgentConnMockRecorder ¶
type MockAgentConnMockRecorder struct {
// contains filtered or unexported fields
}
MockAgentConnMockRecorder is the mock recorder for MockAgentConn.
func (*MockAgentConnMockRecorder) AwaitReachable ¶
func (mr *MockAgentConnMockRecorder) AwaitReachable(ctx any) *gomock.Call
AwaitReachable indicates an expected call of AwaitReachable.
func (*MockAgentConnMockRecorder) Close ¶
func (mr *MockAgentConnMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockAgentConnMockRecorder) DebugLogs ¶
func (mr *MockAgentConnMockRecorder) DebugLogs(ctx any) *gomock.Call
DebugLogs indicates an expected call of DebugLogs.
func (*MockAgentConnMockRecorder) DebugMagicsock ¶
func (mr *MockAgentConnMockRecorder) DebugMagicsock(ctx any) *gomock.Call
DebugMagicsock indicates an expected call of DebugMagicsock.
func (*MockAgentConnMockRecorder) DebugManifest ¶
func (mr *MockAgentConnMockRecorder) DebugManifest(ctx any) *gomock.Call
DebugManifest indicates an expected call of DebugManifest.
func (*MockAgentConnMockRecorder) DialContext ¶
func (mr *MockAgentConnMockRecorder) DialContext(ctx, network, addr any) *gomock.Call
DialContext indicates an expected call of DialContext.
func (*MockAgentConnMockRecorder) GetPeerDiagnostics ¶
func (mr *MockAgentConnMockRecorder) GetPeerDiagnostics() *gomock.Call
GetPeerDiagnostics indicates an expected call of GetPeerDiagnostics.
func (*MockAgentConnMockRecorder) ListContainers ¶
func (mr *MockAgentConnMockRecorder) ListContainers(ctx any) *gomock.Call
ListContainers indicates an expected call of ListContainers.
func (*MockAgentConnMockRecorder) ListeningPorts ¶
func (mr *MockAgentConnMockRecorder) ListeningPorts(ctx any) *gomock.Call
ListeningPorts indicates an expected call of ListeningPorts.
func (*MockAgentConnMockRecorder) Netcheck ¶
func (mr *MockAgentConnMockRecorder) Netcheck(ctx any) *gomock.Call
Netcheck indicates an expected call of Netcheck.
func (*MockAgentConnMockRecorder) Ping ¶
func (mr *MockAgentConnMockRecorder) Ping(ctx any) *gomock.Call
Ping indicates an expected call of Ping.
func (*MockAgentConnMockRecorder) PrometheusMetrics ¶
func (mr *MockAgentConnMockRecorder) PrometheusMetrics(ctx any) *gomock.Call
PrometheusMetrics indicates an expected call of PrometheusMetrics.
func (*MockAgentConnMockRecorder) ReconnectingPTY ¶
func (mr *MockAgentConnMockRecorder) ReconnectingPTY(ctx, id, height, width, command any, initOpts ...any) *gomock.Call
ReconnectingPTY indicates an expected call of ReconnectingPTY.
func (*MockAgentConnMockRecorder) RecreateDevcontainer ¶
func (mr *MockAgentConnMockRecorder) RecreateDevcontainer(ctx, devcontainerID any) *gomock.Call
RecreateDevcontainer indicates an expected call of RecreateDevcontainer.
func (*MockAgentConnMockRecorder) SSH ¶
func (mr *MockAgentConnMockRecorder) SSH(ctx any) *gomock.Call
SSH indicates an expected call of SSH.
func (*MockAgentConnMockRecorder) SSHClient ¶
func (mr *MockAgentConnMockRecorder) SSHClient(ctx any) *gomock.Call
SSHClient indicates an expected call of SSHClient.
func (*MockAgentConnMockRecorder) SSHClientOnPort ¶
func (mr *MockAgentConnMockRecorder) SSHClientOnPort(ctx, port any) *gomock.Call
SSHClientOnPort indicates an expected call of SSHClientOnPort.
func (*MockAgentConnMockRecorder) SSHOnPort ¶
func (mr *MockAgentConnMockRecorder) SSHOnPort(ctx, port any) *gomock.Call
SSHOnPort indicates an expected call of SSHOnPort.
func (*MockAgentConnMockRecorder) Speedtest ¶
func (mr *MockAgentConnMockRecorder) Speedtest(ctx, direction, duration any) *gomock.Call
Speedtest indicates an expected call of Speedtest.
func (*MockAgentConnMockRecorder) TailnetConn ¶
func (mr *MockAgentConnMockRecorder) TailnetConn() *gomock.Call
TailnetConn indicates an expected call of TailnetConn.
func (*MockAgentConnMockRecorder) WatchContainers ¶
func (mr *MockAgentConnMockRecorder) WatchContainers(ctx, logger any) *gomock.Call
WatchContainers indicates an expected call of WatchContainers.