Package-level declarations

Types

Link copied to clipboard
object Backoff

Deterministic exponential backoff for events.

Link copied to clipboard

Outcome for one event after a sync batch, reported to KioskOpsDeliveryListener. Usually the server's verdict; an event whose stored payload cannot be decoded is never sent and is reported locally as RETRY_SCHEDULED or QUARANTINED with error payload_decode_failed.

Link copied to clipboard
data class EventDelivery(val eventId: String, val idempotencyKey: String, val type: String, val status: DeliveryStatus, val serverEventId: String? = null, val error: String? = null)

Per-event delivery outcome. Carries identifiers and the server's error string only; never the payload.

Link copied to clipboard

Callback fired once per event after the local queue state is updated: when the server acknowledges or rejects it, or when its payload cannot be decoded (error payload_decode_failed; the server never sees that event, and a batch in which no event decodes makes no transport call at all). Batch-level failures (HTTP errors, timeouts) report nothing: the events stay queued and retry. Implementations must be thread-safe; callbacks may fire from background threads. A listener that throws is logged and ignored.

Link copied to clipboard
class SyncEngine @JvmOverloads constructor(context: Context, cfgProvider: () -> KioskOpsConfig, queue: QueueRepository, transport: Transport, logs: RingLog, telemetry: TelemetrySink, audit: PersistentAuditTrail, clock: Clock, onDelivery: (EventDelivery) -> Unit = {})

Fleet-ops sync engine.

Link copied to clipboard
data class SyncOnceResult(val attempted: Int, val sent: Int, val permanentFailed: Int, val transientFailed: Int, val rejected: Int)

Outcome of one sync flush attempt.

Link copied to clipboard
data class SyncPolicy(val enabled: Boolean, val endpointPath: String = "events/batch", val batchSize: Int = 50, val requireUnmeteredNetwork: Boolean = false, val maxAttemptsPerEvent: Int = 12, val connectTimeoutSeconds: Long = 15, val readTimeoutSeconds: Long = 30, val writeTimeoutSeconds: Long = 30, val callTimeoutSeconds: Long = 60)

Network sync policy.