feat(api): enhance peer session management and documentation
CI / changes (push) Successful in 8s
CI / commitlint (push) Has been skipped
CI / openapi (push) Successful in 27s
CI / web (push) Failing after 35s
CI / go (push) Successful in 55s
CI / bird2 (push) Successful in 15s
CI / release (push) Has been skipped
CI / changes (push) Successful in 8s
CI / commitlint (push) Has been skipped
CI / openapi (push) Successful in 27s
CI / web (push) Failing after 35s
CI / go (push) Successful in 55s
CI / bird2 (push) Successful in 15s
CI / release (push) Has been skipped
- Added new fields to the API for tracking connected speakers and session states across multiple nodes, including `connected_speaker_id`, `connected_speaker_label`, `session_on_speakers`, `established_on_speakers`, and `session_mismatch`. - Implemented a new endpoint for retrieving bird protocol sessions, enhancing the agent server functionality. - Updated the OpenAPI documentation to reflect the new fields and query parameters, improving clarity for API consumers. - Modified the frontend to display connected speaker information and session states, providing better visibility into peer connections. - Updated deployment documentation to clarify the configuration requirements for enabling IP forwarding on VPS.
This commit is contained in:
@@ -124,11 +124,20 @@ func AgentSyncURL(meta SpeakerMeta) string {
|
||||
|
||||
// AgentHealthURL returns HTTPS health URL for agent_domain.
|
||||
func AgentHealthURL(meta SpeakerMeta) string {
|
||||
return agentHTTPSURL(meta, "/v1/agent/health")
|
||||
}
|
||||
|
||||
// AgentBirdProtocolsURL returns HTTPS bird protocols URL for agent_domain.
|
||||
func AgentBirdProtocolsURL(meta SpeakerMeta) string {
|
||||
return agentHTTPSURL(meta, "/v1/agent/bird/protocols")
|
||||
}
|
||||
|
||||
func agentHTTPSURL(meta SpeakerMeta, path string) string {
|
||||
domain := strings.TrimSpace(meta.AgentDomain)
|
||||
if domain == "" {
|
||||
return ""
|
||||
}
|
||||
return "https://" + strings.TrimSuffix(domain, "/") + "/v1/agent/health"
|
||||
return "https://" + strings.TrimSuffix(domain, "/") + path
|
||||
}
|
||||
|
||||
// SpeakerNeedsRemoteDispatch reports whether deploy_apply should wake this speaker via agent HTTP.
|
||||
|
||||
Reference in New Issue
Block a user