Updates
This commit is contained in:
@@ -22,6 +22,7 @@ import { getDb, isHyperDbEnabled } from '../db/index.js'
|
||||
import { isSwarmEnabled } from '../db/replicate.js'
|
||||
import { listRemoteDbs } from '../db/remote.js'
|
||||
import { getParentCollector, isParentEnabled } from '../services/collectors/parent.js'
|
||||
import { getRestTunnelInfo } from '../services/rest-tunnel.js'
|
||||
|
||||
/**
|
||||
* @param {string} pathname
|
||||
@@ -243,10 +244,14 @@ export async function handleRest(pathname, query) {
|
||||
{ name: 'snapshot' },
|
||||
{ name: 'exportSnapshot' },
|
||||
{ name: 'prometheusPush' },
|
||||
{ name: 'retrainAnomaly' },
|
||||
{ name: 'gcBuffers' },
|
||||
],
|
||||
})
|
||||
}
|
||||
if (path === '/api/v3/tunnel') {
|
||||
return json(getRestTunnelInfo())
|
||||
}
|
||||
if (path === '/api/v3/export' || path === '/api/v2/export') {
|
||||
const { buildSnapshot, writeSnapshotFile, toPrometheusText } = await import(
|
||||
'../services/export.js'
|
||||
@@ -351,6 +356,7 @@ function infoPayload() {
|
||||
protocol: PROTOCOL,
|
||||
protocolVersion: PROTOCOL_VERSION,
|
||||
publicKeyHex: getServerPublicKeyHex(),
|
||||
anomalyMode: process.env.PEARDATA_ANOMALY_MODE || 'threshold',
|
||||
hyperdb: getDb()
|
||||
? {
|
||||
publicKeyHex: getDb().publicKeyHex,
|
||||
@@ -358,6 +364,7 @@ function infoPayload() {
|
||||
swarm: isSwarmEnabled(),
|
||||
}
|
||||
: null,
|
||||
restTunnel: getRestTunnelInfo(),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user