package com.cameleer.server.core.agent;

import java.time.Instant;

public interface AgentEventRepository {

    void insert(String instanceId, String applicationId, String environment, String eventType, String detail);

    /**
     * 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
     * the first page.
     */
    AgentEventPage queryPage(String applicationId, String instanceId, String environment,
                             Instant from, Instant to, String cursor, int limit);
}
