refactor(events): remove dead non-paginated query path
AgentEventService.queryEvents, AgentEventRepository.query, and the ClickHouse implementation have had no callers since /agents/events became cursor-paginated. Remove them along with their dedicated IT tests. queryPage and its tests remain as the single query path. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,14 +1,11 @@
|
||||
package com.cameleer.server.core.agent;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
|
||||
public interface AgentEventRepository {
|
||||
|
||||
void insert(String instanceId, String applicationId, String environment, String eventType, String detail);
|
||||
|
||||
List<AgentEventRecord> query(String applicationId, String instanceId, String environment, Instant from, Instant to, int limit);
|
||||
|
||||
/**
|
||||
* Cursor-paginated query ordered by (timestamp DESC, instance_id ASC). The cursor
|
||||
* is an opaque base64 string produced by the implementation; pass {@code null} for
|
||||
|
||||
@@ -4,7 +4,6 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
|
||||
public class AgentEventService {
|
||||
|
||||
@@ -21,10 +20,6 @@ public class AgentEventService {
|
||||
repository.insert(instanceId, applicationId, environment, eventType, detail);
|
||||
}
|
||||
|
||||
public List<AgentEventRecord> queryEvents(String applicationId, String instanceId, String environment, Instant from, Instant to, int limit) {
|
||||
return repository.query(applicationId, instanceId, environment, from, to, limit);
|
||||
}
|
||||
|
||||
public AgentEventPage queryEventPage(String applicationId, String instanceId, String environment,
|
||||
Instant from, Instant to, String cursor, int limit) {
|
||||
return repository.queryPage(applicationId, instanceId, environment, from, to, cursor, limit);
|
||||
|
||||
Reference in New Issue
Block a user