DeviceIpCollector

Best-effort, session-local observations of the device's public IP addresses, for install attribution. Never waits on the network when reading attributes. Mirrors DeviceIPCollector on iOS.

Facade over a DeviceIpState actor: observations and lookup schedules live in its state, and lookups are claimed in its queue so the same one never starts twice.

Types

Link copied to clipboard
class Lookup

One address lookup with its own schedule, so a failing IPv6 lookup doesn't hold up or speed up the IPv4 one.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val now: () -> Long
Link copied to clipboard
open override val scope: CoroutineScope
Link copied to clipboard
open override val state: StateFlow<DeviceIpState>

Delegate state reads to the actor.

Functions

Link copied to clipboard

Fire-and-forget dispatch of a sub-action on this context's actor.

Link copied to clipboard
open suspend fun immediate(action: TypedAction<DeviceIpContext>)
Link copied to clipboard
open suspend fun immediateUntil(action: TypedAction<DeviceIpContext>, until: (DeviceIpState) -> Boolean)
Link copied to clipboard
open fun sideEffect(what: suspend () -> Unit)
Link copied to clipboard
open override fun update(reducer: Reducer<DeviceIpState>)

Apply a state reducer inline.