agentconnmock
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
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) EditFiles(ctx context.Context, edits workspacesdk.FileEditRequest) error
- func (m *MockAgentConn) GetPeerDiagnostics() tailnet.PeerDiagnostics
- func (m *MockAgentConn) LS(ctx context.Context, path string, req workspacesdk.LSRequest) (workspacesdk.LSResponse, error)
- 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) ReadFile(ctx context.Context, path string, offset, limit int64) (io.ReadCloser, string, 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)
- func (m *MockAgentConn) WriteFile(ctx context.Context, path string, reader io.Reader) 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) EditFiles(ctx, edits any) *gomock.Call
- func (mr *MockAgentConnMockRecorder) GetPeerDiagnostics() *gomock.Call
- func (mr *MockAgentConnMockRecorder) LS(ctx, path, req any) *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) ReadFile(ctx, path, offset, limit 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
- func (mr *MockAgentConnMockRecorder) WriteFile(ctx, path, reader any) *gomock.Call
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeMockAgentConn¶
type MockAgentConn struct {// contains filtered or unexported fields}MockAgentConn is a mock of AgentConn interface.
funcNewMockAgentConn¶
func NewMockAgentConn(ctrl *gomock.Controller) *MockAgentConn
NewMockAgentConn creates a new mock instance.
func (*MockAgentConn)AwaitReachable¶
func (m *MockAgentConn) AwaitReachable(ctxcontext.Context)bool
AwaitReachable mocks base method.
func (*MockAgentConn)DebugLogs¶
func (m *MockAgentConn) DebugLogs(ctxcontext.Context) ([]byte,error)
DebugLogs mocks base method.
func (*MockAgentConn)DebugMagicsock¶
func (m *MockAgentConn) DebugMagicsock(ctxcontext.Context) ([]byte,error)
DebugMagicsock mocks base method.
func (*MockAgentConn)DebugManifest¶
func (m *MockAgentConn) DebugManifest(ctxcontext.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)EditFiles¶added inv2.27.0
func (m *MockAgentConn) EditFiles(ctxcontext.Context, editsworkspacesdk.FileEditRequest)error
EditFiles mocks base method.
func (*MockAgentConn)GetPeerDiagnostics¶
func (m *MockAgentConn) GetPeerDiagnostics()tailnet.PeerDiagnostics
GetPeerDiagnostics mocks base method.
func (*MockAgentConn)LS¶added inv2.27.0
func (m *MockAgentConn) LS(ctxcontext.Context, pathstring, reqworkspacesdk.LSRequest) (workspacesdk.LSResponse,error)
LS mocks base method.
func (*MockAgentConn)ListContainers¶
func (m *MockAgentConn) ListContainers(ctxcontext.Context) (codersdk.WorkspaceAgentListContainersResponse,error)
ListContainers mocks base method.
func (*MockAgentConn)ListeningPorts¶
func (m *MockAgentConn) ListeningPorts(ctxcontext.Context) (codersdk.WorkspaceAgentListeningPortsResponse,error)
ListeningPorts mocks base method.
func (*MockAgentConn)Netcheck¶
func (m *MockAgentConn) Netcheck(ctxcontext.Context) (healthsdk.AgentNetcheckReport,error)
Netcheck mocks base method.
func (*MockAgentConn)Ping¶
func (m *MockAgentConn) Ping(ctxcontext.Context) (time.Duration,bool, *ipnstate.PingResult,error)
Ping mocks base method.
func (*MockAgentConn)PrometheusMetrics¶
func (m *MockAgentConn) PrometheusMetrics(ctxcontext.Context) ([]byte,error)
PrometheusMetrics mocks base method.
func (*MockAgentConn)ReadFile¶added inv2.27.0
func (m *MockAgentConn) ReadFile(ctxcontext.Context, pathstring, offset, limitint64) (io.ReadCloser,string,error)
ReadFile mocks base method.
func (*MockAgentConn)ReconnectingPTY¶
func (m *MockAgentConn) ReconnectingPTY(ctxcontext.Context, iduuid.UUID, height, widthuint16, commandstring, initOpts ...workspacesdk.AgentReconnectingPTYInitOption) (net.Conn,error)
ReconnectingPTY mocks base method.
func (*MockAgentConn)RecreateDevcontainer¶
func (m *MockAgentConn) RecreateDevcontainer(ctxcontext.Context, devcontainerIDstring) (codersdk.Response,error)
RecreateDevcontainer mocks base method.
func (*MockAgentConn)SSHClientOnPort¶
SSHClientOnPort mocks base method.
func (*MockAgentConn)Speedtest¶
func (m *MockAgentConn) Speedtest(ctxcontext.Context, directionspeedtest.Direction, durationtime.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(ctxcontext.Context, loggerslog.Logger) (<-chancodersdk.WorkspaceAgentListContainersResponse,io.Closer,error)
WatchContainers mocks base method.
typeMockAgentConnMockRecorder¶
type MockAgentConnMockRecorder struct {// contains filtered or unexported fields}MockAgentConnMockRecorder is the mock recorder for MockAgentConn.
func (*MockAgentConnMockRecorder)AwaitReachable¶
func (mr *MockAgentConnMockRecorder) AwaitReachable(ctxany) *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(ctxany) *gomock.Call
DebugLogs indicates an expected call of DebugLogs.
func (*MockAgentConnMockRecorder)DebugMagicsock¶
func (mr *MockAgentConnMockRecorder) DebugMagicsock(ctxany) *gomock.Call
DebugMagicsock indicates an expected call of DebugMagicsock.
func (*MockAgentConnMockRecorder)DebugManifest¶
func (mr *MockAgentConnMockRecorder) DebugManifest(ctxany) *gomock.Call
DebugManifest indicates an expected call of DebugManifest.
func (*MockAgentConnMockRecorder)DialContext¶
func (mr *MockAgentConnMockRecorder) DialContext(ctx, network, addrany) *gomock.Call
DialContext indicates an expected call of DialContext.
func (*MockAgentConnMockRecorder)EditFiles¶added inv2.27.0
func (mr *MockAgentConnMockRecorder) EditFiles(ctx, editsany) *gomock.Call
EditFiles indicates an expected call of EditFiles.
func (*MockAgentConnMockRecorder)GetPeerDiagnostics¶
func (mr *MockAgentConnMockRecorder) GetPeerDiagnostics() *gomock.Call
GetPeerDiagnostics indicates an expected call of GetPeerDiagnostics.
func (*MockAgentConnMockRecorder)LS¶added inv2.27.0
func (mr *MockAgentConnMockRecorder) LS(ctx, path, reqany) *gomock.Call
LS indicates an expected call of LS.
func (*MockAgentConnMockRecorder)ListContainers¶
func (mr *MockAgentConnMockRecorder) ListContainers(ctxany) *gomock.Call
ListContainers indicates an expected call of ListContainers.
func (*MockAgentConnMockRecorder)ListeningPorts¶
func (mr *MockAgentConnMockRecorder) ListeningPorts(ctxany) *gomock.Call
ListeningPorts indicates an expected call of ListeningPorts.
func (*MockAgentConnMockRecorder)Netcheck¶
func (mr *MockAgentConnMockRecorder) Netcheck(ctxany) *gomock.Call
Netcheck indicates an expected call of Netcheck.
func (*MockAgentConnMockRecorder)Ping¶
func (mr *MockAgentConnMockRecorder) Ping(ctxany) *gomock.Call
Ping indicates an expected call of Ping.
func (*MockAgentConnMockRecorder)PrometheusMetrics¶
func (mr *MockAgentConnMockRecorder) PrometheusMetrics(ctxany) *gomock.Call
PrometheusMetrics indicates an expected call of PrometheusMetrics.
func (*MockAgentConnMockRecorder)ReadFile¶added inv2.27.0
func (mr *MockAgentConnMockRecorder) ReadFile(ctx, path, offset, limitany) *gomock.Call
ReadFile indicates an expected call of ReadFile.
func (*MockAgentConnMockRecorder)ReconnectingPTY¶
func (mr *MockAgentConnMockRecorder) ReconnectingPTY(ctx, id, height, width, commandany, initOpts ...any) *gomock.Call
ReconnectingPTY indicates an expected call of ReconnectingPTY.
func (*MockAgentConnMockRecorder)RecreateDevcontainer¶
func (mr *MockAgentConnMockRecorder) RecreateDevcontainer(ctx, devcontainerIDany) *gomock.Call
RecreateDevcontainer indicates an expected call of RecreateDevcontainer.
func (*MockAgentConnMockRecorder)SSH¶
func (mr *MockAgentConnMockRecorder) SSH(ctxany) *gomock.Call
SSH indicates an expected call of SSH.
func (*MockAgentConnMockRecorder)SSHClient¶
func (mr *MockAgentConnMockRecorder) SSHClient(ctxany) *gomock.Call
SSHClient indicates an expected call of SSHClient.
func (*MockAgentConnMockRecorder)SSHClientOnPort¶
func (mr *MockAgentConnMockRecorder) SSHClientOnPort(ctx, portany) *gomock.Call
SSHClientOnPort indicates an expected call of SSHClientOnPort.
func (*MockAgentConnMockRecorder)SSHOnPort¶
func (mr *MockAgentConnMockRecorder) SSHOnPort(ctx, portany) *gomock.Call
SSHOnPort indicates an expected call of SSHOnPort.
func (*MockAgentConnMockRecorder)Speedtest¶
func (mr *MockAgentConnMockRecorder) Speedtest(ctx, direction, durationany) *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, loggerany) *gomock.Call
WatchContainers indicates an expected call of WatchContainers.