SharedFlowEventBus
GatewayEventBus implementation which uses SharedFlow as backend.
Doesn't support cancellation with unsubscribe function, please use returned DisposableHandle from subscribe for this purpose.
Constructors
Link copied to clipboard
fun SharedFlowEventBus(coroutineScope: CoroutineScope, replay: Int = 0, extraBufferCapacity: Int = 16, onBufferOverflow: BufferOverflow = BufferOverflow.SUSPEND)
Functions
Link copied to clipboard
open suspend override fun <Event : GatewayPayloadEvent<Data>, Data : Any> raise(definition: GatewayEventDefinition<Event, Data>, event: Event, scope: GatewayCall)
Link copied to clipboard
open override fun <Event : GatewayPayloadEvent<Data>, Data : Any> subscribe(definition: GatewayEventDefinition<Event, Data>, concurrent: Boolean, handler: GatewayEventHandler<Event, Data>): DisposableHandle
Link copied to clipboard
open override fun <Event : GatewayPayloadEvent<Data>, Data : Any> unsubscribe(definition: GatewayEventDefinition<Event, Data>, handler: GatewayEventHandler<Event, Data>): Nothing