feat(clickhouse): add ClickHouseLogStore with LogIndex interface

Extract LogIndex interface from OpenSearchLogIndex. Both ClickHouseLogStore
and OpenSearchLogIndex implement it. Controllers now inject LogIndex.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-03-31 23:42:07 +02:00
parent c73e4abf68
commit 7d7eb52afb
7 changed files with 351 additions and 14 deletions

View File

@@ -0,0 +1,6 @@
package com.cameleer3.server.core.storage;
import java.time.Instant;
public record LogEntryResult(String timestamp, String level, String loggerName,
String message, String threadName, String stackTrace) {}

View File

@@ -0,0 +1,15 @@
package com.cameleer3.server.core.storage;
import com.cameleer3.common.model.LogEntry;
import java.time.Instant;
import java.util.List;
public interface LogIndex {
List<LogEntryResult> search(String application, String agentId, String level,
String query, String exchangeId,
Instant from, Instant to, int limit);
void indexBatch(String agentId, String application, List<LogEntry> entries);
}