-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 네트워크 토폴로지 로직 리팩토링 CompletableFuture를 이용해서 병렬로 처리 및 Builder 클래스를 통해 추상화하여 가독성 향상
- Loading branch information
1 parent
25a5a81
commit 0672f8a
Showing
29 changed files
with
564 additions
and
262 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
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
13 changes: 13 additions & 0 deletions
13
...ication/app-api/src/main/java/com/univ/tracedin/api/project/dto/ServiceSearchRequest.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,13 @@ | ||
package com.univ.tracedin.api.project.dto; | ||
|
||
import com.univ.tracedin.domain.project.ProjectKey; | ||
import com.univ.tracedin.domain.project.ServiceSearchCondition; | ||
|
||
public record ServiceSearchRequest(String projectKey, String serviceName) { | ||
public ServiceSearchCondition toCondition() { | ||
return ServiceSearchCondition.builder() | ||
.projectKey(ProjectKey.from(projectKey)) | ||
.serviceName(serviceName) | ||
.build(); | ||
} | ||
} |
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
16 changes: 16 additions & 0 deletions
16
tracedin-domain/src/main/java/com/univ/tracedin/domain/project/EndPointUrl.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,16 @@ | ||
package com.univ.tracedin.domain.project; | ||
|
||
import java.util.regex.Pattern; | ||
|
||
public record EndPointUrl(String value) { | ||
|
||
private static final Pattern ENDPOINT_PATTERN = | ||
Pattern.compile("^(https?://)([a-zA-Z0-9.-]+)(:[0-9]+)?(/[a-zA-Z0-9._-]+)*$"); | ||
|
||
public static EndPointUrl from(String url) { | ||
if (url == null || !ENDPOINT_PATTERN.matcher(url).matches()) { | ||
throw new IllegalArgumentException("Invalid endpoint URL format: " + url); | ||
} | ||
return new EndPointUrl(url); | ||
} | ||
} |
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
8 changes: 8 additions & 0 deletions
8
tracedin-domain/src/main/java/com/univ/tracedin/domain/project/NetworkTopologyAnalyer.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,8 @@ | ||
package com.univ.tracedin.domain.project; | ||
|
||
import com.univ.tracedin.domain.span.Topology; | ||
|
||
public interface NetworkTopologyAnalyer { | ||
|
||
Topology analyze(Project projectKey); | ||
} |
6 changes: 0 additions & 6 deletions
6
tracedin-domain/src/main/java/com/univ/tracedin/domain/project/NetworkTopologyBuilder.java
This file was deleted.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
tracedin-domain/src/main/java/com/univ/tracedin/domain/project/ProjectAnalyzer.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,7 +1,11 @@ | ||
package com.univ.tracedin.domain.project; | ||
|
||
import java.util.List; | ||
|
||
public interface ProjectAnalyzer { | ||
|
||
ProjectStatistic<?> analyze( | ||
TraceSearchCondition cond, ProjectStatistic.StatisticsType statisticsType); | ||
|
||
List<EndPointUrl> getEndpoints(ServiceSearchCondition cond); | ||
} |
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
26 changes: 26 additions & 0 deletions
26
tracedin-domain/src/main/java/com/univ/tracedin/domain/project/ServiceSearchCondition.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,26 @@ | ||
package com.univ.tracedin.domain.project; | ||
|
||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.experimental.SuperBuilder; | ||
|
||
import io.micrometer.common.util.StringUtils; | ||
|
||
@Getter | ||
@SuperBuilder | ||
@Builder | ||
public class ServiceSearchCondition { | ||
protected ProjectKey projectKey; | ||
protected String serviceName; | ||
|
||
protected ServiceSearchCondition(ProjectKey projectKey, String serviceName) { | ||
this.projectKey = projectKey; | ||
this.serviceName = serviceName; | ||
} | ||
|
||
protected ServiceSearchCondition() {} | ||
|
||
public boolean hasServiceName() { | ||
return StringUtils.isNotBlank(serviceName); | ||
} | ||
} |
Oops, something went wrong.