Package-level declarations

Functions

Link copied to clipboard
fun <S : MVIState, I : MVIIntent, A : MVIAction> StoreBuilder<S, I, A>.collectMetrics(metrics: DefaultMetrics<S, I, A>, name: String? = DefaultDecoratorName): Metrics

Install a new metricsDecorator

fun <S : MVIState, I : MVIIntent, A : MVIAction> StoreBuilder<S, I, A>.collectMetrics(reportingScope: CoroutineScope, offloadContext: CoroutineContext = Dispatchers.Default, windowSeconds: Int = 60, emaAlpha: Double = 0.1, clock: Clock = Clock.System, bucketDuration: Duration = 1.seconds, timeSource: TimeSource = TimeSource.Monotonic, name: String? = DefaultDecoratorName): DefaultMetrics<S, I, A>

Create, install, and return a Metrics instance that will use the provided configuration to populate and produce pro.respawn.flowmvi.metrics.api.MetricsSnapshots.

Link copied to clipboard
fun <S : MVIState, I : MVIIntent, A : MVIAction> metrics(reportingScope: CoroutineScope, offloadContext: CoroutineContext = Dispatchers.Default, windowSeconds: Int = 60, emaAlpha: Double = 0.1, bucketDuration: Duration = 1.seconds, clock: Clock = Clock.System, timeSource: TimeSource = TimeSource.Monotonic): DefaultMetrics<S, I, A>

Create a DefaultMetrics.

Link copied to clipboard
fun <S : MVIState, I : MVIIntent, A : MVIAction> metricsDecorator(metrics: DefaultMetrics<S, I, A>, name: String? = DefaultDecoratorName): PluginDecorator<S, I, A>

Creates a decorator that populates the pro.respawn.flowmvi.metrics.api.MetricsSnapshots returned by the metrics. Without this decorator, Metrics won't do anything on its own (please see the definition) for more details

Link copied to clipboard
fun <S : MVIState, I : MVIIntent, A : MVIAction> metricsReporter(builder: DefaultMetrics<S, I, A>, interval: Duration = 30.seconds, flushOnStop: Boolean = true, name: String? = DefaultName, sink: MetricsSink): StorePlugin<S, I, A>

A default Metrics collection plugin that periodically snapshots metrics and forwards them to sink, optionally flushing on stop.

fun <S : MVIState, I : MVIIntent, A : MVIAction> metricsReporter(metrics: Metrics, offloadScope: CoroutineScope, offloadContext: CoroutineContext = Dispatchers.Default, interval: Duration = 30.seconds, flushOnStop: Boolean = true, name: String? = DefaultName, sink: MetricsSink): StorePlugin<S, I, A>

A default Metrics collection plugin that periodically snapshots metrics and forwards them to sink, optionally flushing on stop.

Link copied to clipboard
fun <S : MVIState, I : MVIIntent, A : MVIAction> StoreBuilder<S, I, A>.reportMetrics(metrics: DefaultMetrics<S, I, A>, interval: Duration = 30.seconds, flushOnStop: Boolean = true, name: String? = DefaultName, sink: MetricsSink)
fun <S : MVIState, I : MVIIntent, A : MVIAction> StoreBuilder<S, I, A>.reportMetrics(metrics: Metrics, offloadScope: CoroutineScope, offloadContext: CoroutineContext = Dispatchers.Default, interval: Duration = 30.seconds, flushOnStop: Boolean = true, name: String? = DefaultName, sink: MetricsSink)

Install a new metricsReporter into the current pro.respawn.flowmvi.api.Store.