Skip to content

Commit

Permalink
Expose eventStore to be able to remove all events from database
Browse files Browse the repository at this point in the history
  • Loading branch information
danigutierrezayuso authored and matus-tomlein committed Jan 30, 2024
1 parent 49c5ee0 commit ccb7172
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/Core/Emitter/EmitterControllerImpl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ class EmitterControllerImpl: Controller, EmitterController {
}
}

var eventStore: EventStore? {
return emitter.eventStore
}

// MARK: - Methods

func flush() {
Expand Down
3 changes: 3 additions & 0 deletions Sources/Snowplow/Controllers/EmitterController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ public protocol EmitterController: EmitterConfigurationProtocol {
/// Whether the emitter is currently sending events.
@objc
var isSending: Bool { get }
/// The EventStore being used by the emitter.
@objc
var eventStore: EventStore? { get }
@objc
func flush()
/// Pause emitting events.
Expand Down

0 comments on commit ccb7172

Please sign in to comment.