[+] 添加集群配置
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
|:--|:--|:--|
|
|:--|:--|:--|
|
||||||
|taoyao|桃夭|桃之夭夭灼灼其华|
|
|taoyao|桃夭|桃之夭夭灼灼其华|
|
||||||
|taoyao-boot|基础|基础模块|
|
|taoyao-boot|基础|基础模块|
|
||||||
|
|taoyao-node|集群|集群模块|
|
||||||
|taoyao-live|直播|直播、连麦、本地视频同看|
|
|taoyao-live|直播|直播、连麦、本地视频同看|
|
||||||
|taoyao-media|媒体|录制<br />音频(降噪、混音、变声)<br />视频(水印、美颜、AI识别)|
|
|taoyao-media|媒体|录制<br />音频(降噪、混音、变声)<br />视频(水印、美颜、AI识别)|
|
||||||
|taoyao-signal|信令|信令服务|
|
|taoyao-signal|信令|信令服务|
|
||||||
|
|||||||
1
pom.xml
1
pom.xml
@@ -36,6 +36,7 @@
|
|||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>taoyao-boot</module>
|
<module>taoyao-boot</module>
|
||||||
|
<module>taoyao-node</module>
|
||||||
<module>taoyao-live</module>
|
<module>taoyao-live</module>
|
||||||
<module>taoyao-media</module>
|
<module>taoyao-media</module>
|
||||||
<module>taoyao-signal</module>
|
<module>taoyao-signal</module>
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.acgist.taoyao.boot.property;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点配置
|
||||||
|
*
|
||||||
|
* @author acgist
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@Schema(title = "节点配置", description = "节点配置")
|
||||||
|
public class NodeProperties {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点主机
|
||||||
|
*/
|
||||||
|
@Schema(title = "节点主机", description = "节点主机")
|
||||||
|
private String host;
|
||||||
|
/**
|
||||||
|
* 节点端口
|
||||||
|
*/
|
||||||
|
@Schema(title = "节点端口", description = "节点端口")
|
||||||
|
private Integer port;
|
||||||
|
/**
|
||||||
|
* 用户
|
||||||
|
*/
|
||||||
|
@Schema(title = "节点用户", description = "节点用户")
|
||||||
|
@JsonIgnore
|
||||||
|
private String username;
|
||||||
|
/**
|
||||||
|
* 密码
|
||||||
|
*/
|
||||||
|
@Schema(title = "节点密码", description = "节点密码")
|
||||||
|
@JsonIgnore
|
||||||
|
private String password;
|
||||||
|
/**
|
||||||
|
* 服务节点ID
|
||||||
|
*/
|
||||||
|
@Schema(title = "服务节点ID", description = "服务节点ID")
|
||||||
|
private String serverId;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@ package com.acgist.taoyao.boot.property;
|
|||||||
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
@@ -16,24 +17,35 @@ import lombok.Setter;
|
|||||||
public class TaoyaoProperties {
|
public class TaoyaoProperties {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 地址
|
* 项目地址
|
||||||
*/
|
*/
|
||||||
|
@Schema(title = "项目地址", description = "项目地址")
|
||||||
private String url;
|
private String url;
|
||||||
/**
|
/**
|
||||||
* 名称
|
* 项目名称
|
||||||
*/
|
*/
|
||||||
|
@Schema(title = "项目名称", description = "项目名称")
|
||||||
private String name;
|
private String name;
|
||||||
/**
|
/**
|
||||||
* 超时时间
|
* 超时时间
|
||||||
*/
|
*/
|
||||||
|
@Schema(title = "超时时间", description = "超时时间")
|
||||||
private Long timeout;
|
private Long timeout;
|
||||||
/**
|
/**
|
||||||
* 版本
|
* 项目版本
|
||||||
*/
|
*/
|
||||||
|
@Schema(title = "项目版本", description = "项目版本")
|
||||||
private String version;
|
private String version;
|
||||||
/**
|
/**
|
||||||
* 描述
|
* 项目描述
|
||||||
*/
|
*/
|
||||||
|
@Schema(title = "项目描述", description = "项目描述")
|
||||||
private String description;
|
private String description;
|
||||||
|
/**
|
||||||
|
* 服务节点ID
|
||||||
|
* 集群使用
|
||||||
|
*/
|
||||||
|
@Schema(title = "服务节点ID", description = "服务节点ID")
|
||||||
|
private String serverId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
6
taoyao-node/README.md
Normal file
6
taoyao-node/README.md
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# 集群
|
||||||
|
|
||||||
|
## 实现逻辑
|
||||||
|
|
||||||
|
1. 集群启动时加载所有节点,同步节点信息,定时监测节点状态。
|
||||||
|
2. 设备注册同步设备信息到直连节点,其他信令处理完成以后在发送设备时分发。
|
||||||
22
taoyao-node/pom.xml
Normal file
22
taoyao-node/pom.xml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>com.acgist</groupId>
|
||||||
|
<artifactId>taoyao</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>taoyao-node</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<name>taoyao-node</name>
|
||||||
|
<description>集群服务:集群服务</description>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -52,6 +52,7 @@ taoyao:
|
|||||||
timeout: 5000
|
timeout: 5000
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
description: WebRTC信令服务
|
description: WebRTC信令服务
|
||||||
|
server-id: 1
|
||||||
id:
|
id:
|
||||||
sn: 0
|
sn: 0
|
||||||
max-index: 999999
|
max-index: 999999
|
||||||
@@ -109,8 +110,8 @@ taoyao:
|
|||||||
port: 18888
|
port: 18888
|
||||||
schema: wss
|
schema: wss
|
||||||
websocket: /websocket.signal
|
websocket: /websocket.signal
|
||||||
username: username
|
username: taoyao
|
||||||
password: password
|
password: taoyao
|
||||||
# Moon架构配置
|
# Moon架构配置
|
||||||
moon:
|
moon:
|
||||||
audio-mix: true
|
audio-mix: true
|
||||||
@@ -130,3 +131,9 @@ taoyao:
|
|||||||
password: taoyao
|
password: taoyao
|
||||||
scheduled:
|
scheduled:
|
||||||
session: 0 * * * * ?
|
session: 0 * * * * ?
|
||||||
|
node-list:
|
||||||
|
- host: localhost
|
||||||
|
port: 8888
|
||||||
|
username: ${taoyao.security.username:taoyao}
|
||||||
|
password: ${taoyao.security.username:taoyao}
|
||||||
|
|
||||||
Reference in New Issue
Block a user