feat: add RouteCatalogStore interface and RouteCatalogEntry record
This commit is contained in:
@@ -0,0 +1,10 @@
|
|||||||
|
package com.cameleer.server.core.storage;
|
||||||
|
|
||||||
|
import java.time.Instant;
|
||||||
|
|
||||||
|
public record RouteCatalogEntry(
|
||||||
|
String applicationId,
|
||||||
|
String routeId,
|
||||||
|
String environment,
|
||||||
|
Instant firstSeen,
|
||||||
|
Instant lastSeen) {}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.cameleer.server.core.storage;
|
||||||
|
|
||||||
|
import java.time.Instant;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface RouteCatalogStore {
|
||||||
|
|
||||||
|
void upsert(String applicationId, String environment, Collection<String> routeIds);
|
||||||
|
|
||||||
|
List<RouteCatalogEntry> findByEnvironment(String environment, Instant from, Instant to);
|
||||||
|
|
||||||
|
List<RouteCatalogEntry> findAll(Instant from, Instant to);
|
||||||
|
|
||||||
|
void deleteByApplication(String applicationId);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user