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

Method Ping

coderd/workspaceagentsrpc.go:231–243  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

229}
230
231func (y *yamuxPingerCloser) Ping(ctx context.Context) error {
232 errCh := make(chan error, 1)
233 go func() {
234 _, err := y.mux.Ping()
235 errCh <- err
236 }()
237 select {
238 case <-ctx.Done():
239 return ctx.Err()
240 case err := <-errCh:
241 return err
242 }
243}
244
245func (api *API) startAgentYamuxMonitor(ctx context.Context,
246 workspace database.Workspace,

Callers

nothing calls this directly

Calls 3

ErrMethod · 0.80
PingMethod · 0.65
DoneMethod · 0.45

Tested by

no test coverage detected