feat: Add multi-target load balancing support
Fixes #47. - Added lua-resty-balancer to dependencies (Dockerfile & install.sh). - Added 'targets' field to the Host model to hold additional targets. - Updated the UI to allow inputting additional targets (IP:port). - Updated targetinfo.lua to parse the additional targets and load balance between them and the primary target using resty.balancer.round_robin.
This commit is contained in:
@@ -28,6 +28,7 @@ class Host extends Table{
|
||||
'host': {isRequired: true, type: 'string', min: 1, max: 500},
|
||||
'ip': {isRequired: true, type: 'string', min: 3, max: 500},
|
||||
'targetPort': {isRequired: true, type: 'number', min:0, max:65535},
|
||||
'targets': {default: function(){return []}, isRequired: false, type: 'object'},
|
||||
'forcessl': {isRequired: false, default: true, type: 'boolean'},
|
||||
'targetssl': {isRequired: false, default: false, type: 'boolean'},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user