初始化仓库

This commit is contained in:
shikong 2023-08-17 17:28:42 +08:00
parent f52771d85e
commit 2a84b883e9
6 changed files with 31 additions and 3 deletions

View File

@ -4,6 +4,8 @@ import lombok.Data;
@Data
public class ApiConfig {
private String apiDebug;
private Integer apiDebug;
private String secret;
private String defaultSnap;
private String snapRoot;
}

View File

@ -0,0 +1,14 @@
package cn.skcks.docking.gb28181.media.dto.config;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import lombok.Data;
@Data
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public class ClusterConfig {
private String originUrl;
private String retryCount;
private String timeoutSec;
}

View File

@ -1,10 +1,15 @@
package cn.skcks.docking.gb28181.media.dto.config;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import lombok.Data;
@Data
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public class FFMpegConfig {
private String bin;
private String cmd;
private String log;
private Integer restartSec;
private String snap;
}

View File

@ -1,9 +1,12 @@
package cn.skcks.docking.gb28181.media.dto.config;
import com.fasterxml.jackson.annotation.JsonAlias;
import lombok.Data;
@Data
public class GeneralConfig {
@JsonAlias("check_nvidia_dev")
private Integer checkNvidiaDev;
private Integer enableVhost;
private Integer flowThreshold;
private Integer maxStreamWaitMS;

View File

@ -17,4 +17,7 @@ public class ServerConfig {
@JsonUnwrapped(prefix = "hls.")
private HlsConfig hls;
@JsonUnwrapped(prefix = "cluster.")
private ClusterConfig cluster;
}

View File

@ -29,10 +29,11 @@ public class MediaServiceTest {
@Test
void context(){
ResponseEntity<String> entity = zlMediaHttpService.getServerConfigResponseEntity(config.getSecret());
String secret = config.getSecret();
ResponseEntity<String> entity = zlMediaHttpService.getServerConfigResponseEntity(secret);
log.info("{}", entity.getBody());
JsonResponse<List<ServerConfig>> test = zlMediaHttpService.getServerConfig(config.getSecret());
JsonResponse<List<ServerConfig>> test = zlMediaHttpService.getServerConfig(secret);
log.info("{}", test);
}
}