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:
hsiegeln
2026-04-17 13:16:28 +02:00
parent a0a0635ddd
commit 6d3956935d
4 changed files with 0 additions and 124 deletions

View File

@@ -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

View File

@@ -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);