diff --git a/README.md b/README.md index 0417f5d..b71eb5f 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ |:--|:--|:--| |taoyao|桃夭|桃之夭夭灼灼其华| |taoyao-boot|基础|基础模块| +|taoyao-node|集群|集群模块| |taoyao-live|直播|直播、连麦、本地视频同看| |taoyao-media|媒体|录制
音频(降噪、混音、变声)
视频(水印、美颜、AI识别)| |taoyao-signal|信令|信令服务| diff --git a/pom.xml b/pom.xml index 075be2d..16b3c8b 100644 --- a/pom.xml +++ b/pom.xml @@ -36,6 +36,7 @@ taoyao-boot + taoyao-node taoyao-live taoyao-media taoyao-signal diff --git a/taoyao-boot/src/main/java/com/acgist/taoyao/boot/property/NodeProperties.java b/taoyao-boot/src/main/java/com/acgist/taoyao/boot/property/NodeProperties.java new file mode 100644 index 0000000..a6e73b9 --- /dev/null +++ b/taoyao-boot/src/main/java/com/acgist/taoyao/boot/property/NodeProperties.java @@ -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; + +} diff --git a/taoyao-boot/src/main/java/com/acgist/taoyao/boot/property/TaoyaoProperties.java b/taoyao-boot/src/main/java/com/acgist/taoyao/boot/property/TaoyaoProperties.java index c0e4c24..9666856 100644 --- a/taoyao-boot/src/main/java/com/acgist/taoyao/boot/property/TaoyaoProperties.java +++ b/taoyao-boot/src/main/java/com/acgist/taoyao/boot/property/TaoyaoProperties.java @@ -2,6 +2,7 @@ package com.acgist.taoyao.boot.property; import org.springframework.boot.context.properties.ConfigurationProperties; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.Setter; @@ -16,24 +17,35 @@ import lombok.Setter; public class TaoyaoProperties { /** - * 地址 + * 项目地址 */ + @Schema(title = "项目地址", description = "项目地址") private String url; /** - * 名称 + * 项目名称 */ + @Schema(title = "项目名称", description = "项目名称") private String name; /** * 超时时间 */ + @Schema(title = "超时时间", description = "超时时间") private Long timeout; /** - * 版本 + * 项目版本 */ + @Schema(title = "项目版本", description = "项目版本") private String version; /** - * 描述 + * 项目描述 */ + @Schema(title = "项目描述", description = "项目描述") private String description; + /** + * 服务节点ID + * 集群使用 + */ + @Schema(title = "服务节点ID", description = "服务节点ID") + private String serverId; } diff --git a/taoyao-node/README.md b/taoyao-node/README.md new file mode 100644 index 0000000..c63cbcf --- /dev/null +++ b/taoyao-node/README.md @@ -0,0 +1,6 @@ +# 集群 + +## 实现逻辑 + +1. 集群启动时加载所有节点,同步节点信息,定时监测节点状态。 +2. 设备注册同步设备信息到直连节点,其他信令处理完成以后在发送设备时分发。 diff --git a/taoyao-node/pom.xml b/taoyao-node/pom.xml new file mode 100644 index 0000000..c064f1c --- /dev/null +++ b/taoyao-node/pom.xml @@ -0,0 +1,22 @@ + + + + + 4.0.0 + + + com.acgist + taoyao + 1.0.0 + + + taoyao-node + jar + + taoyao-node + 集群服务:集群服务 + + + + + \ No newline at end of file diff --git a/taoyao-server/src/main/resources/application.yml b/taoyao-server/src/main/resources/application.yml index e28fcb8..963cdca 100644 --- a/taoyao-server/src/main/resources/application.yml +++ b/taoyao-server/src/main/resources/application.yml @@ -52,6 +52,7 @@ taoyao: timeout: 5000 version: 1.0.0 description: WebRTC信令服务 + server-id: 1 id: sn: 0 max-index: 999999 @@ -109,8 +110,8 @@ taoyao: port: 18888 schema: wss websocket: /websocket.signal - username: username - password: password + username: taoyao + password: taoyao # Moon架构配置 moon: audio-mix: true @@ -130,3 +131,9 @@ taoyao: password: taoyao scheduled: session: 0 * * * * ? + node-list: + - host: localhost + port: 8888 + username: ${taoyao.security.username:taoyao} + password: ${taoyao.security.username:taoyao} + \ No newline at end of file