(ctx context.Context)
| 422 | } |
| 423 | |
| 424 | func 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 |
no test coverage detected