feat: enhance API and session management with Nacos and Redis integration
- Add Nacos registry for service registration and deregistration. - Implement Redis registry for session management with heartbeat and session claiming. - Improve completion service with session handling and request validation. - Enhance WebSocket handling for completion requests with JSON-RPC support. - Add tests for new registry implementations and completion manager functionalities. - Refactor existing code for better readability and maintainability.
This commit is contained in:
55
backend/config.json
Normal file
55
backend/config.json
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"port": "8080",
|
||||
"workspaceDir": ".",
|
||||
"allowOrigin": "*",
|
||||
"apiToken": "",
|
||||
"requestTimeout": "10s",
|
||||
"maxBodyBytes": 2097152,
|
||||
"sessionTTL": "20m",
|
||||
"cleanupInterval": "2m",
|
||||
"maxSessions": 256,
|
||||
"instanceID": "",
|
||||
"instanceURL": "http://127.0.0.1:8080",
|
||||
"enableRedis": true,
|
||||
"redisAddr": "10.0.0.10:6379",
|
||||
"redisPassword": "",
|
||||
"redisDB": 1,
|
||||
"redisKeyPrefix": "lsp-gateway",
|
||||
"instanceTTL": "30s",
|
||||
"heartbeat": "10s",
|
||||
"enableNacosRegister": true,
|
||||
"nacosServerAddr": "10.0.0.10:8848",
|
||||
"nacosNamespace": "",
|
||||
"nacosGroup": "DEFAULT_GROUP",
|
||||
"nacosServiceName": "lsp-gateway",
|
||||
"nacosClusterName": "",
|
||||
"nacosUsername": "",
|
||||
"nacosPassword": "",
|
||||
"nacosRegisterIP": "",
|
||||
"nacosRegisterPort": 8080,
|
||||
"nacosEphemeral": true,
|
||||
"servers": [
|
||||
{
|
||||
"language": "go",
|
||||
"languageId": "go",
|
||||
"command": "gopls",
|
||||
"args": []
|
||||
},
|
||||
{
|
||||
"language": "javascript",
|
||||
"languageId": "javascript",
|
||||
"command": "typescript-language-server",
|
||||
"args": [
|
||||
"--stdio"
|
||||
]
|
||||
},
|
||||
{
|
||||
"language": "typescript",
|
||||
"languageId": "typescript",
|
||||
"command": "typescript-language-server",
|
||||
"args": [
|
||||
"--stdio"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user