MCPcopy Index your code
hub / github.com/coder/coder / Start

Method Start

codersdk/workspacesdk/tunneler/integration_test.go:81–102  ·  view source on GitHub ↗
(conn workspacesdk.AgentConn)

Source from the content-addressed store, hash-verified

79}
80
81func (s *sshApplication) Start(conn workspacesdk.AgentConn) error {
82 var err error
83 s.client, err = conn.SSHClient(s.ctx)
84 if err != nil {
85 s.t.Error(err)
86 return err
87 }
88 go func() {
89 defer close(s.done)
90 sess, err := s.client.NewSession()
91 if err != nil {
92 s.t.Error("failed to create session", err)
93 }
94 defer sess.Close()
95 out, err := sess.Output("echo foo")
96 if err != nil {
97 s.t.Error("failed to echo", err)
98 }
99 s.result = string(out)
100 }()
101 return nil
102}

Callers

nothing calls this directly

Calls 5

NewSessionMethod · 0.80
SSHClientMethod · 0.65
CloseMethod · 0.65
OutputMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected