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

Function testOrDefaultResolver

codersdk/workspacesdk/workspacesdk.go:424–431  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

422}
423
424func testOrDefaultResolver(ctx context.Context) Resolver {
425 // check the context for a non-default resolver. This is only used in testing.
426 resolver, ok := ctx.Value(dnsResolverContextKey{}).(Resolver)
427 if !ok || resolver == nil {
428 resolver = net.DefaultResolver
429 }
430 return resolver
431}
432
433// ExistsViaCoderConnect checks if the given hostname exists via Coder Connect. This doesn't guarantee the
434// workspace is actually reachable, if, for example, its agent is unhealthy, but rather that Coder Connect knows about

Callers 1

ExistsViaCoderConnectFunction · 0.85

Calls 1

ValueMethod · 0.45

Tested by

no test coverage detected