A Kotlin Multiplatform library for building network-resilient applications
implementation "org.mobilenativefoundation.store:store5:5.1.0-alpha02"
commonMain {
dependencies {
implementation("org.mobilenativefoundation.store:store5:5.1.0-alpha02")
}
}
StoreBuilder
.from<Key, Network, Output, Local>(fetcher, sourceOfTruth)
.converter(converter)
.validator(validator)
.build(updater, bookkeeper)
store.write(
request = StoreWriteRequest.of<Key, Output, Response>(
key = key,
value = value
)
)
1. StoreWriteResponse.Success.Typed<Response>(response)
store.stream<Response>(request = StoreReadRequest.cached(key, refresh = false))
1. StoreReadResponse.Data(value, origin = StoreReadResponseOrigin.Cache)
store.write(
request = StoreWriteRequest.of<Key, Output, Response>(
key = key,
value = newValue
)
)
1. StoreWriteResponse.Success.Typed<Response>(response)
store.clear(key)
Copyright (c) 2024 Mobile Native Foundation.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.