Skip to content

Simplify SubscriptionEventStreamBatch type #112

@mtesseract

Description

@mtesseract

Currently SubscriptionEventStreamBatch is defined as follows

data SubscriptionEventStreamBatch a = SubscriptionEventStreamBatch
  { _cursor :: SubscriptionCursor -- ^ cursor for this subscription batch
  , _events :: Maybe (Vector a) -- ^ Events for this subscription batch
  } deriving (Show, Generic)

In particular, _events is defined as a Maybe (Vector a). As I see it, we don't need the extra Maybe wrapping at this point. The case "no events field present in Nakadi batch" could be handled just like "empty events array in Nakadi batch".

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions