nakadi-client-0.2.0.1: Client library for the Nakadi Event Broker

Copyright(c) Moritz Schulte 2017
LicenseBSD3
Maintainermtesseract@silverratio.net
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Network.Nakadi.EventTypes.Events

Description

This module implements the /event-types/EVENT-TYPE/events API.

Synopsis

Documentation

eventSource Source #

Arguments

:: (MonadNakadi m, MonadResource m, MonadBaseControl IO m, MonadMask m, FromJSON a) 
=> Config

Configuration parameter

-> Maybe ConsumeParameters

Optional parameters for event consumption

-> EventTypeName

Name of the event type to consume

-> Maybe [Cursor]

Optional list of cursors; by default consumption begins with the most recent event

-> m (ConduitM () (EventStreamBatch a) m ())

Returns a Conduit source.

GET to /event-types/NAME/events. Returns Conduit source for event batch consumption.

eventSourceR Source #

Arguments

:: (MonadNakadiEnv r m, MonadResource m, MonadBaseControl IO m, MonadMask m, FromJSON a) 
=> Maybe ConsumeParameters

Optional parameters for event consumption

-> EventTypeName

Name of the event type to consume

-> Maybe [Cursor]

Optional list of cursors; by default consumption begins with the most recent event

-> m (ConduitM () (EventStreamBatch a) m ())

Returns a Conduit source.

GET to /event-types/NAME/events. Returns Conduit source for event batch consumption. Retrieves configuration from environment.

eventPublish :: (MonadNakadi m, ToJSON a) => Config -> EventTypeName -> Maybe FlowId -> [a] -> m () Source #

POST to /event-types/NAME/events. Publishes a batch of events for the specified event type.

eventPublishR :: (MonadNakadiEnv r m, ToJSON a) => EventTypeName -> Maybe FlowId -> [a] -> m () Source #

POST to /event-types/NAME/events. Publishes a batch of events for the specified event type. Uses the configuration from the environment.