kts
| Kind | ffi-zig |
|---|---|
| Categories | data-structures concurrency caching |
| Keywords | kts ets table cache concurrency in-memory |
Kit Term Storage - fast, concurrent in-memory tables inspired by Erlang's ETS
Files
| File | Description |
|---|---|
kit.toml | Package manifest with metadata and dependencies |
src/main.kit | Table management, CRUD, queries, and atomic ops |
zig/kts.zig | Low-level Zig implementation with mutex locking |
tests/query-operations-test.kit | Tests for pattern matching and select operations |
tests/set-operations-test.kit | Tests for insert, lookup, delete, and keys |
tests/table-lifecycle-test.kit | Tests for table creation, types, and cleanup |
Dependencies
No Kit package dependencies.
Installation
kit add gitlab.com/kit-lang/packages/kit-kts.gitUsage
import Kit.KtsLicense
MIT License - see LICENSE for details.
Exported Functions & Types
KTSError
KTS error type for typed error handling.
Variants
TableCreateError {message}TableNotFoundError {message}InvalidKeyError {message}TableClosedError {message}TableType
Table type variants for different storage patterns. - Set: Unique keys, O(1) lookup (hash map) - OrderedSet: Unique keys, sorted, O(log n) lookup (balanced tree) - Bag: Duplicate keys allowed, unique values per key - DuplicateBag: Duplicate keys and values allowed
Variants
SetOrderedSetBagDuplicateBagTableOption
Table options for configuring access and behavior. - :named - Table can be looked up by name via KTS.whereis - :public - Any process can read/write (default) - :protected - Any process can read, only owner can write - :private - Only owner can read/write
Variants
NamedPublicProtectedPrivate