mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 00:06:38 +00:00
add clusters logic
This commit is contained in:
@@ -2845,6 +2845,10 @@ components:
|
||||
domain:
|
||||
type: string
|
||||
description: Domain for the reverse proxy
|
||||
proxy_cluster:
|
||||
type: string
|
||||
description: The proxy cluster handling this reverse proxy (derived from domain)
|
||||
example: "eu.proxy.netbird.io"
|
||||
targets:
|
||||
type: array
|
||||
items:
|
||||
@@ -3007,6 +3011,21 @@ components:
|
||||
description: Whether link auth is enabled
|
||||
required:
|
||||
- enabled
|
||||
ProxyCluster:
|
||||
type: object
|
||||
description: A proxy cluster represents a group of proxy nodes serving the same address
|
||||
properties:
|
||||
address:
|
||||
type: string
|
||||
description: Cluster address used for CNAME targets
|
||||
example: "eu.proxy.netbird.io"
|
||||
connected_proxies:
|
||||
type: integer
|
||||
description: Number of proxy nodes connected in this cluster
|
||||
example: 3
|
||||
required:
|
||||
- address
|
||||
- connected_proxies
|
||||
ReverseProxyDomainType:
|
||||
type: string
|
||||
description: Type of Reverse Proxy Domain
|
||||
@@ -6702,6 +6721,29 @@ paths:
|
||||
"$ref": "#/components/responses/forbidden"
|
||||
'500':
|
||||
"$ref": "#/components/responses/internal_error"
|
||||
/api/reverse-proxies/clusters:
|
||||
get:
|
||||
summary: List available proxy clusters
|
||||
description: Returns a list of available proxy clusters with their connection status
|
||||
tags: [ Reverse Proxy ]
|
||||
security:
|
||||
- BearerAuth: [ ]
|
||||
- TokenAuth: [ ]
|
||||
responses:
|
||||
'200':
|
||||
description: A JSON Array of proxy clusters
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/ProxyCluster'
|
||||
'401':
|
||||
"$ref": "#/components/responses/requires_authentication"
|
||||
'403':
|
||||
"$ref": "#/components/responses/forbidden"
|
||||
'500':
|
||||
"$ref": "#/components/responses/internal_error"
|
||||
/api/reverse-proxies/{proxyId}:
|
||||
get:
|
||||
summary: Retrieve a Reverse Proxy
|
||||
|
||||
@@ -1947,6 +1947,15 @@ type ProxyAccessLog struct {
|
||||
UserId *string `json:"user_id,omitempty"`
|
||||
}
|
||||
|
||||
// ProxyCluster A proxy cluster represents a group of proxy nodes serving the same address
|
||||
type ProxyCluster struct {
|
||||
// Address Cluster address used for CNAME targets
|
||||
Address string `json:"address"`
|
||||
|
||||
// ConnectedProxies Number of proxy nodes connected in this cluster
|
||||
ConnectedProxies int `json:"connected_proxies"`
|
||||
}
|
||||
|
||||
// Resource defines model for Resource.
|
||||
type Resource struct {
|
||||
// Id ID of the resource
|
||||
@@ -1974,6 +1983,9 @@ type ReverseProxy struct {
|
||||
// Name Reverse proxy name
|
||||
Name string `json:"name"`
|
||||
|
||||
// ProxyCluster The proxy cluster handling this reverse proxy (derived from domain)
|
||||
ProxyCluster *string `json:"proxy_cluster,omitempty"`
|
||||
|
||||
// Targets List of target backends for this reverse proxy
|
||||
Targets []ReverseProxyTarget `json:"targets"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user