dsh 0.2.0-rc.2: in-container update (experimental channel), path-agnostic compose, upstream patches adapted to 0.1.x/0.2.x
This commit is contained in:
commit
e6dcef9bf5
302 files changed
+75178
No files matched your search
@@ -0,0 +1,20 @@
|
||||
import { request } from 'node:http'
|
||||
|
||||
const socketPath = process.env.DSH_PLATFORM_MANAGEMENT_SOCKET ?? '/run/dsh-platform/management.sock'
|
||||
|
||||
const status = await new Promise((resolve, reject) => {
|
||||
const probe = request({
|
||||
socketPath,
|
||||
path: '/_dsh_platform/internal/health',
|
||||
method: 'GET',
|
||||
timeout: 2_000,
|
||||
}, response => {
|
||||
response.resume()
|
||||
resolve(response.statusCode)
|
||||
})
|
||||
probe.once('timeout', () => probe.destroy(new Error('management health check timed out')))
|
||||
probe.once('error', reject)
|
||||
probe.end()
|
||||
})
|
||||
|
||||
if (status !== 200) throw new Error(`management health check returned ${String(status)}`)
|
||||
Reference in new issue
Block a user