add loadbalance endpoint for extclients

This commit is contained in:
abhishek9686
2025-03-02 20:59:27 +04:00
parent 33fafa83e6
commit 76311f072d
2 changed files with 16 additions and 0 deletions

View File

@@ -27,6 +27,11 @@ func GetExtClientConfig(networkName, clientID string) string {
return get(fmt.Sprintf("/api/extclients/%s/%s/file", networkName, clientID))
}
// GetExtClientConfig - auto fetch a client config
func GetExtClientHAConfig(networkName string) string {
return get(fmt.Sprintf("/api/v1/client_conf/%s", networkName))
}
// CreateExtClient - create an external client
func CreateExtClient(networkName, nodeID string, extClient models.CustomExtClient) {
request[any](http.MethodPost, fmt.Sprintf("/api/extclients/%s/%s", networkName, nodeID), extClient)