UniFFI Foreign API Contract
This reference details the foreign interface exposed by aerolog-uniffi to Kotlin and Swift.
1. FfiAeroLogDb
Constructors
- Kotlin:
FfiAeroLogDb.open(path: String, maxSegmentSizeBytes: ULong): FfiAeroLogDb - Swift:
FfiAeroLogDb.open(path: String, maxSegmentSizeBytes: UInt64) throws -> FfiAeroLogDb
Methods
put(collection: String, key: String, value: ByteArray/Data)get(collection: String, key: String): ByteArray?/Data?delete(collection: String, key: String)stream(streamName: String): FfiStreamscanCollection(collection: String): List<FfiKeyValuePair> / [FfiKeyValuePair]scanMutationsSince(sincePhysicalTime: ULong?, sinceLogicalCounter: UShort?, sinceNodeHash: ULong?, limit: UInt): List<FfiMutationRecord> / [FfiMutationRecord]compact(): FfiCompactionStatsshutdown()
2. FfiStream
Methods
append(payload: ByteArray/Data): ULong / UInt64readRecent(limit: UInt): List<FfiStreamEntry> / [FfiStreamEntry]setRetentionMaxEntries(maxEntries: ULong / UInt64)setRetentionTtl(ttlSeconds: ULong / UInt64)
3. Data Records
FfiMutationRecord
data class FfiMutationRecord(
val key: String,
val recordType: UByte,
val physicalTime: ULong,
val logicalCounter: UShort,
val nodeIdHash: ULong,
val collection: String
)