-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #92 from JNU-econovation/restart_process
[FEAT] mdns, montior writer에 프로세스 복구 로직 추가
- Loading branch information
Showing
18 changed files
with
260 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...ructure/log-writer/src/main/java/com/whoz_in/log_writer/common/StubNetworkInterfaces.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.whoz_in.log_writer.common; | ||
|
||
import com.whoz_in.log_writer.config.NetworkConfig; | ||
import java.util.List; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.context.annotation.Profile; | ||
import org.springframework.stereotype.Component; | ||
|
||
|
||
/* | ||
기본적으로 맥에서 iwconfig를 못쓴다. | ||
그래서 local에선 설정한 네트워크 인터페이스를 출력하는 이 가짜 객체를 만든 것이다. | ||
*/ | ||
@Profile("local") | ||
@Component | ||
@RequiredArgsConstructor | ||
public final class StubNetworkInterfaces implements SystemNetworkInterfaces{ | ||
private final NetworkConfig networkConfig; | ||
|
||
@Override | ||
public List<NetworkInterface> getLatest() { | ||
return networkConfig.getNetworkInterfaces(); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...cture/log-writer/src/main/java/com/whoz_in/log_writer/common/SystemNetworkInterfaces.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.whoz_in.log_writer.common; | ||
|
||
import java.util.List; | ||
|
||
//실시간으로 시스템에 존재하는 네트워크 인터페이스들을 얻을 수 있는 기능을 제공해야 한다. | ||
public interface SystemNetworkInterfaces { | ||
List<NetworkInterface> getLatest(); | ||
default boolean exists(NetworkInterface ni){ | ||
return getLatest().contains(ni); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
...s/infrastructure/log-writer/src/main/java/com/whoz_in/log_writer/managed/ManagedInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
package com.whoz_in.log_writer.managed; | ||
|
||
import com.whoz_in.log_writer.common.NetworkInterface; | ||
|
||
//Managed 프로세스를 생성하고 처리하는 과정에서 필요한 정보를 담는다. | ||
public record ManagedInfo(String interfaceName, String ssid, String command) {} | ||
public record ManagedInfo(NetworkInterface ni, String command) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.