Adds an EventQueue, EventPipeline, stubs DataUploadRequestBuilder, and makes public Lytics methods @inlinable. This adds a minimal StreamEvent protocol to which Event, IdentityEvent, and ConsentEvent all conform.
EventQueue manages a Dictionary<String: [any StreamEvent]>. When it is time to flush, the queue calls DataUploadRequestBuilder to encode the events and create the corresponding requests. It then passes those requests to an upload closure.
This adds the @inlinable attribute to the public methods to enable the compiler to optimize calls to them across module boundaries. EventPipeline helps to contain the corresponding proliferation of @usableFromInline types and members.
Finally this adds additional types for testing support. To keep the size of this PR manageable, these tests are included in #18
Adds an
EventQueue
,EventPipeline
, stubsDataUploadRequestBuilder
, and makes publicLytics
methods@inlinable
. This adds a minimalStreamEvent
protocol to whichEvent
,IdentityEvent
, andConsentEvent
all conform.EventQueue
manages aDictionary<String: [any StreamEvent]>
. When it is time to flush, the queue callsDataUploadRequestBuilder
to encode the events and create the corresponding requests. It then passes those requests to anupload
closure.This adds the
@inlinable
attribute to the public methods to enable the compiler to optimize calls to them across module boundaries.EventPipeline
helps to contain the corresponding proliferation of@usableFromInline
types and members.Finally this adds additional types for testing support. To keep the size of this PR manageable, these tests are included in #18
This closes #19