Copyright | (c) Moritz Schulte 2017 2018 |
---|---|
License | BSD3 |
Maintainer | mtesseract@silverratio.net |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Internal module containing HTTP client relevant code.
- module Network.HTTP.Simple
- module Network.HTTP.Types.Status
- type StreamConnectCallback m = Response () -> m ()
- type HttpErrorCallback m = Request -> HttpException -> RetryStatus -> Bool -> m ()
- type ConfigIO = Config IO
- data Config m where
- data ConsumeParameters = ConsumeParameters {}
- data HttpBackend b = HttpBackend {
- _httpLbs :: Config b -> Request -> Maybe Manager -> b (Response ByteString)
- _httpResponseOpen :: Config b -> Request -> Maybe Manager -> b (Response (ConduitM () ByteString b ()))
- _httpResponseClose :: Response () -> b ()
- data NakadiException
- = BatchPartiallySubmitted [BatchItemResponse]
- | BatchNotSubmitted [BatchItemResponse]
- | BatchValidationFailure [BatchItemResponse]
- | ClientNotAuthenticated Problem
- | AccessForbidden Problem
- | UnprocessableEntity Problem
- | Conflict Problem
- | DeserializationFailure ByteString Text
- | UnexpectedResponse (Response ())
- | NotFound Problem
- | TooManyRequests Problem
- | BadRequest Problem
- | SubscriptionNotFound Problem
- | CursorAlreadyCommitted CursorCommitResults
- | CursorResetInProgress Problem
- | EventTypeNotFound Problem
- | SubscriptionExistsAlready Subscription
- | RequestModificationException SomeException
- | CursorDistanceNoResult
- | StreamIdMissing
- type LogFunc m = LogSource -> LogLevel -> LogStr -> m ()
- type LogFuncIO = LogFunc IO
- data Problem = Problem {}
- newtype CursorOffset = CursorOffset {}
- newtype EventTypeName = EventTypeName {}
- newtype PartitionName = PartitionName {}
- newtype CursorToken = CursorToken Text
- data Cursor = Cursor {}
- newtype ApplicationName = ApplicationName {}
- data SubscriptionCursor = SubscriptionCursor {}
- data SubscriptionCursorWithoutToken = SubscriptionCursorWithoutToken {}
- newtype SubscriptionCursorCommit = SubscriptionCursorCommit {
- _items :: [SubscriptionCursor]
- newtype CursorCommit = CursorCommit {}
- newtype SubscriptionId = SubscriptionId {}
- newtype StreamId = StreamId {
- unStreamId :: Text
- data SubscriptionEventStream = SubscriptionEventStream {}
- newtype Timestamp = Timestamp {}
- newtype FlowId = FlowId {}
- newtype EventId = EventId {}
- data Partition = Partition {}
- data ShiftedCursor = ShiftedCursor {}
- data CursorDistanceQuery = CursorDistanceQuery {}
- newtype CursorDistanceResult = CursorDistanceResult {}
- data SubscriptionPosition
- data Subscription = Subscription {}
- data PublishingStatus
- data Step
- data BatchItemResponse = BatchItemResponse {}
- newtype StreamKeepAliveLimit = StreamKeepAliveLimit {}
- newtype BatchFlushTimeout = BatchFlushTimeout {}
- data CursorCommitResultType
- data CursorCommitResult = CursorCommitResult {}
- newtype CursorCommitResults = CursorCommitResults {
- _items :: [CursorCommitResult]
- data SchemaType = SchemaTypeJson
- newtype SchemaVersion = SchemaVersion {}
- data EventTypeSchema = EventTypeSchema {}
- newtype PaginationLink = PaginationLink {}
- data PaginationLinks = PaginationLinks {}
- data EventTypeSchemasResponse = EventTypeSchemasResponse {}
- data SubscriptionsListResponse = SubscriptionsListResponse {
- _links :: PaginationLinks
- _items :: [Subscription]
- newtype Offset = Offset {}
- newtype Limit = Limit {}
- data PartitionState
- data PartitionStat = PartitionStat {}
- data SubscriptionEventTypeStats = SubscriptionEventTypeStats {}
- newtype SubscriptionEventTypeStatsResult = SubscriptionEventTypeStatsResult {}
- data EventTypeCategory
- data PartitionStrategy
- data EnrichmentStrategy = EnrichmentStrategyMetadata
- data CompatibilityMode
- newtype PartitionKeyField = PartitionKeyField {}
- data EventTypeStatistics = EventTypeStatistics {}
- data EventTypeOptions = EventTypeOptions {}
- data EventType = EventType {
- _name :: EventTypeName
- _owningApplication :: Maybe ApplicationName
- _category :: Maybe EventTypeCategory
- _enrichmentStrategies :: Maybe [EnrichmentStrategy]
- _partitionStrategy :: Maybe PartitionStrategy
- _compatibilityMode :: Maybe CompatibilityMode
- _schema :: EventTypeSchema
- _partitionKeyFields :: Maybe [PartitionKeyField]
- _defaultStatistic :: Maybe EventTypeStatistics
- _options :: Maybe EventTypeOptions
- data EventMetadata = EventMetadata {}
- data EventMetadataEnriched = EventMetadataEnriched {}
- data EventStreamBatch a = EventStreamBatch {}
- data SubscriptionEventStreamBatch a = SubscriptionEventStreamBatch {
- _cursor :: SubscriptionCursor
- _events :: Maybe (Vector a)
- data DataOp
- data DataChangeEvent a = DataChangeEvent {}
- data DataChangeEventEnriched a = DataChangeEventEnriched {}
- makeFieldRenamer :: [(String, String)] -> String -> String
- parseUUID :: String -> (UUID -> a) -> Value -> Parser a
- parseInteger :: (Integral i, Bounded i) => String -> (i -> a) -> Value -> Parser a
- class (Monad b, Monad m) => MonadNakadiBase b m where
- newtype NakadiBaseT m a = NakadiBaseT {
- runNakadiBaseT :: m a
- class HasNakadiConfig b r | r -> b where
- class (MonadNakadiBase b m, MonadThrow b, MonadMask b, MonadThrow m, MonadCatch m) => MonadNakadi b m | m -> b where
- type MonadNakadiIO = MonadNakadi IO
- newtype NakadiT b m a = NakadiT {
- _runNakadiT :: Config b -> m a
- runNakadiT :: Config b -> NakadiT b m a -> m a
- httpJsonBody :: (MonadNakadi b m, FromJSON a) => Status -> [(Status, ByteString -> m NakadiException)] -> (Request -> Request) -> m a
- httpJsonNoBody :: MonadNakadi b m => Status -> [(Status, ByteString -> m NakadiException)] -> (Request -> Request) -> m ()
- httpJsonBodyStream :: forall b m r. (MonadNakadi b m, MonadMask m) => Status -> [(Status, ByteString -> m NakadiException)] -> (Request -> Request) -> (Response (ConduitM () ByteString m ()) -> m r) -> m r
- httpBuildRequest :: MonadNakadi b m => (Request -> Request) -> m Request
- conduitDecode :: forall a b m. (FromJSON a, MonadNakadi b m) => Config b -> ConduitM ByteString a m ()
- includeFlowId :: Config b -> Request -> Request
- errorClientNotAuthenticated :: MonadThrow m => ByteString -> m NakadiException
- errorUnprocessableEntity :: MonadThrow m => ByteString -> m NakadiException
- errorAccessForbidden :: MonadThrow m => ByteString -> m NakadiException
- errorTooManyRequests :: MonadThrow m => ByteString -> m NakadiException
- errorBadRequest :: MonadThrow m => ByteString -> m NakadiException
- errorSubscriptionNotFound :: MonadThrow m => ByteString -> m NakadiException
- errorCursorAlreadyCommitted :: MonadThrow m => ByteString -> m NakadiException
- errorCursorResetInProgress :: MonadThrow m => ByteString -> m NakadiException
- errorEventTypeNotFound :: MonadThrow m => ByteString -> m NakadiException
- errorSubscriptionExistsAlready :: MonadThrow m => ByteString -> m NakadiException
- errorBatchPartiallySubmitted :: MonadThrow m => ByteString -> m NakadiException
- errorBatchNotSubmitted :: MonadThrow m => ByteString -> m NakadiException
- setRequestQueryParameters :: [(ByteString, ByteString)] -> Request -> Request
Documentation
module Network.HTTP.Simple
module Network.HTTP.Types.Status
type StreamConnectCallback m = Response () -> m () Source #
Config
type HttpErrorCallback m = Request -> HttpException -> RetryStatus -> Bool -> m () Source #
Type synonym for user-provided callbacks which are used for HTTP Errror propagation.
Config :: {..} -> Config m | |
|
HasNakadiRequestTemplate (Config m) Request | |
HasNakadiStreamConnectCallback (Config m) (Maybe (StreamConnectCallback m)) | |
HasNakadiRetryPolicy (Config m) (RetryPolicyM IO) | |
HasNakadiManager (Config m) (Maybe Manager) | |
HasNakadiLogFunc (Config m) (Maybe (LogFunc m)) | |
HasNakadiHttpErrorCallback (Config m) (Maybe (HttpErrorCallback m)) | |
HasNakadiHttp (Config m) (HttpBackend m) | |
HasNakadiFlowId (Config m) (Maybe FlowId) | |
HasNakadiDeserializationFailureCallback (Config m) (Maybe (ByteString -> Text -> m ())) | |
HasNakadiConsumeParameters (Config m) (Maybe ConsumeParameters) | |
HasNakadiRequestModifier (Config m) (Request -> m Request) | |
HasNakadiHttpResponseOpen (HttpBackend b) (Config b -> Request -> Maybe Manager -> b (Response (ConduitM () ByteString b ()))) | |
HasNakadiHttpLbs (HttpBackend b) (Config b -> Request -> Maybe Manager -> b (Response ByteString)) | |
data ConsumeParameters Source #
ConsumeParameters
Eq ConsumeParameters Source # | |
Ord ConsumeParameters Source # | |
Show ConsumeParameters Source # | |
HasNakadiStreamTimeout ConsumeParameters (Maybe Int32) | |
HasNakadiStreamLimit ConsumeParameters (Maybe Int32) | |
HasNakadiStreamKeepAliveLimit ConsumeParameters (Maybe Int32) | |
HasNakadiMaxUncommittedEvents ConsumeParameters (Maybe Int32) | |
HasNakadiBatchLimit ConsumeParameters (Maybe Int32) | |
HasNakadiBatchFlushTimeout ConsumeParameters (Maybe Int32) | |
HasNakadiConsumeParameters (Config m) (Maybe ConsumeParameters) | |
data HttpBackend b Source #
HttpBackend | |
|
HasNakadiHttp (Config m) (HttpBackend m) | |
HasNakadiHttpResponseOpen (HttpBackend b) (Config b -> Request -> Maybe Manager -> b (Response (ConduitM () ByteString b ()))) | |
HasNakadiHttpResponseClose (HttpBackend b) (Response () -> b ()) | |
HasNakadiHttpLbs (HttpBackend b) (Config b -> Request -> Maybe Manager -> b (Response ByteString)) | |
data NakadiException Source #
type LogFunc m = LogSource -> LogLevel -> LogStr -> m () Source #
Type of a logger callback provided to nakadi-client for logging purposes.
Type for RFC7807 Problem
objects.
Problem | |
|
newtype CursorOffset Source #
Type for cursor offsets.
CursorOffset | |
|
Eq CursorOffset Source # | |
Ord CursorOffset Source # | |
Show CursorOffset Source # | |
IsString CursorOffset Source # | |
Generic CursorOffset Source # | |
Hashable CursorOffset Source # | |
ToJSON CursorOffset Source # | |
FromJSON CursorOffset Source # | |
HasNakadiOffset Cursor CursorOffset | |
HasNakadiOldestAvailableOffset Partition CursorOffset | |
HasNakadiNewestAvailableOffset Partition CursorOffset | |
type Rep CursorOffset Source # | |
newtype EventTypeName Source #
Type for event type names.
EventTypeName | |
|
Eq EventTypeName Source # | |
Ord EventTypeName Source # | |
Show EventTypeName Source # | |
IsString EventTypeName Source # | |
Generic EventTypeName Source # | |
Hashable EventTypeName Source # | |
ToJSON EventTypeName Source # | |
FromJSON EventTypeName Source # | |
HasNakadiEventType EventMetadataEnriched EventTypeName | |
HasNakadiName EventType EventTypeName | |
HasNakadiEventTypes Subscription [EventTypeName] | |
type Rep EventTypeName Source # | |
newtype PartitionName Source #
Type for partition names.
PartitionName | |
|
Eq PartitionName Source # | |
Ord PartitionName Source # | |
Show PartitionName Source # | |
IsString PartitionName Source # | |
Generic PartitionName Source # | |
Hashable PartitionName Source # | |
ToJSON PartitionName Source # | |
FromJSON PartitionName Source # | |
HasNakadiPartition Cursor PartitionName | |
HasNakadiPartition Partition PartitionName | |
HasNakadiPartition EventMetadata (Maybe PartitionName) | |
HasNakadiPartition EventMetadataEnriched (Maybe PartitionName) | |
type Rep PartitionName Source # | |
newtype CursorToken Source #
Type for cursor tokens.
Type for cursors.
Eq Cursor Source # | |
Ord Cursor Source # | |
Show Cursor Source # | |
Generic Cursor Source # | |
Hashable Cursor Source # | |
ToJSON Cursor Source # | |
FromJSON Cursor Source # | |
HasNakadiPartition Cursor PartitionName | |
HasNakadiOffset Cursor CursorOffset | |
HasNakadiInitialCursor CursorDistanceQuery Cursor | |
HasNakadiFinalCursor CursorDistanceQuery Cursor | |
HasNakadiItems CursorCommit [Cursor] | |
HasNakadiCursor (EventStreamBatch a) Cursor | |
type Rep Cursor Source # | |
newtype ApplicationName Source #
Type for application names.
Eq ApplicationName Source # | |
Ord ApplicationName Source # | |
Show ApplicationName Source # | |
IsString ApplicationName Source # | |
Generic ApplicationName Source # | |
Hashable ApplicationName Source # | |
ToJSON ApplicationName Source # | |
FromJSON ApplicationName Source # | |
HasNakadiOwningApplication Subscription ApplicationName | |
HasNakadiOwningApplication EventType (Maybe ApplicationName) | |
type Rep ApplicationName Source # | |
data SubscriptionCursor Source #
Type fo rsubscription cursors.
SubscriptionCursor | |
|
Eq SubscriptionCursor Source # | |
Ord SubscriptionCursor Source # | |
Show SubscriptionCursor Source # | |
Generic SubscriptionCursor Source # | |
ToJSON SubscriptionCursor Source # | |
FromJSON SubscriptionCursor Source # | |
HasNakadiSubscriptionCursor SubscriptionCursor | |
HasNakadiItems SubscriptionCursorCommit [SubscriptionCursor] | |
HasNakadiCursor (SubscriptionEventStreamBatch a) SubscriptionCursor | |
type Rep SubscriptionCursor Source # | |
data SubscriptionCursorWithoutToken Source #
Type for subscription cursors without token.
SubscriptionCursorWithoutToken | |
|
newtype SubscriptionCursorCommit Source #
Type for commit object for subscription cursor committing.
SubscriptionCursorCommit | |
|
newtype CursorCommit Source #
Type for commit objects for cursor committing.
Show CursorCommit Source # | |
Generic CursorCommit Source # | |
ToJSON CursorCommit Source # | |
FromJSON CursorCommit Source # | |
HasNakadiItems CursorCommit [Cursor] | |
type Rep CursorCommit Source # | |
newtype SubscriptionId Source #
Type for subscription IDs.
SubscriptionId | |
|
Eq SubscriptionId Source # | |
Ord SubscriptionId Source # | |
Show SubscriptionId Source # | |
Generic SubscriptionId Source # | |
Hashable SubscriptionId Source # | |
ToJSON SubscriptionId Source # | |
FromJSON SubscriptionId Source # | |
HasNakadiSubscriptionId SubscriptionEventStream SubscriptionId | |
HasNakadiId SubscriptionId UUID | |
HasNakadiId Subscription (Maybe SubscriptionId) | |
type Rep SubscriptionId Source # | |
Type for stream IDs.
StreamId | |
|
data SubscriptionEventStream Source #
SubscriptionEventStream
Show SubscriptionEventStream Source # | |
HasNakadiSubscriptionId SubscriptionEventStream SubscriptionId | |
HasNakadiStreamId SubscriptionEventStream StreamId | |
Type for timestamps.
Timestamp | |
|
Eq Timestamp Source # | |
Ord Timestamp Source # | |
Show Timestamp Source # | |
Generic Timestamp Source # | |
Hashable Timestamp Source # | |
ToJSON Timestamp Source # | |
FromJSON Timestamp Source # | |
HasNakadiOccurredAt EventMetadata Timestamp | |
HasNakadiOccurredAt EventMetadataEnriched Timestamp | |
HasNakadiReceivedAt EventMetadataEnriched Timestamp | |
HasNakadiUTCTime Timestamp UTCTime | |
HasNakadiCreatedAt Subscription (Maybe Timestamp) | |
HasNakadiCreatedAt EventTypeSchema (Maybe Timestamp) | |
type Rep Timestamp Source # | |
A Flow ID.
ID of an Event
Eq EventId Source # | |
Ord EventId Source # | |
Show EventId Source # | |
Generic EventId Source # | |
Hashable EventId Source # | |
ToJSON EventId Source # | |
FromJSON EventId Source # | |
HasNakadiEid EventMetadata EventId | |
HasNakadiEid EventMetadataEnriched EventId | |
HasNakadiId EventId UUID | |
HasNakadiParentEids EventMetadata (Maybe [EventId]) | |
HasNakadiParentEids EventMetadataEnriched (Maybe [EventId]) | |
type Rep EventId Source # | |
Partition Data
Partition | |
|
data ShiftedCursor Source #
Type for shift-cursor queries.
ShiftedCursor | |
|
data CursorDistanceQuery Source #
Type for cursor-distance queries. Represents the request to compute the distance between initial cursor and final cursor.
CursorDistanceQuery | |
|
Eq CursorDistanceQuery Source # | |
Ord CursorDistanceQuery Source # | |
Show CursorDistanceQuery Source # | |
Generic CursorDistanceQuery Source # | |
Hashable CursorDistanceQuery Source # | |
ToJSON CursorDistanceQuery Source # | |
FromJSON CursorDistanceQuery Source # | |
HasNakadiInitialCursor CursorDistanceQuery Cursor | |
HasNakadiFinalCursor CursorDistanceQuery Cursor | |
type Rep CursorDistanceQuery Source # | |
newtype CursorDistanceResult Source #
Type for results of cursor-distance-queries.
data SubscriptionPosition Source #
Type for subscription positions.
data Subscription Source #
Type for a Subscription.
Eq Subscription Source # | |
Ord Subscription Source # | |
Show Subscription Source # | |
Generic Subscription Source # | |
Hashable Subscription Source # | |
ToJSON Subscription Source # | |
FromJSON Subscription Source # | |
HasNakadiOwningApplication Subscription ApplicationName | |
HasNakadiCreatedAt Subscription (Maybe Timestamp) | |
HasNakadiItems SubscriptionsListResponse [Subscription] | |
HasNakadiReadFrom Subscription (Maybe SubscriptionPosition) | |
HasNakadiInitialCursors Subscription (Maybe [SubscriptionCursorWithoutToken]) | |
HasNakadiId Subscription (Maybe SubscriptionId) | |
HasNakadiEventTypes Subscription [EventTypeName] | |
HasNakadiConsumerGroup Subscription (Maybe Text) | |
type Rep Subscription Source # | |
data PublishingStatus Source #
Type for publishing status.
Step
data BatchItemResponse Source #
In case of failures during batch publishing, Nakadi returns detailed information about which events failed to be published. This per-event information is a batch item response.
newtype StreamKeepAliveLimit Source #
StreamKeepAliveLimit
newtype BatchFlushTimeout Source #
BatchFlushTimeout
data CursorCommitResultType Source #
CursorCommitResultType
data CursorCommitResult Source #
CursorCommitResult
newtype CursorCommitResults Source #
data SchemaType Source #
SchemaType
Eq SchemaType Source # | |
Ord SchemaType Source # | |
Show SchemaType Source # | |
Generic SchemaType Source # | |
Hashable SchemaType Source # | |
ToJSON SchemaType Source # | |
FromJSON SchemaType Source # | |
HasNakadiSchemaType EventTypeSchema SchemaType | |
type Rep SchemaType Source # | |
newtype SchemaVersion Source #
Type for the version of a schema.
Eq SchemaVersion Source # | |
Ord SchemaVersion Source # | |
Show SchemaVersion Source # | |
IsString SchemaVersion Source # | |
Generic SchemaVersion Source # | |
Hashable SchemaVersion Source # | |
ToJSON SchemaVersion Source # | |
FromJSON SchemaVersion Source # | |
HasNakadiVersion EventMetadataEnriched SchemaVersion | |
HasNakadiVersion EventTypeSchema (Maybe SchemaVersion) | |
type Rep SchemaVersion Source # | |
data EventTypeSchema Source #
Type for the schema of an event type.
EventTypeSchema | |
|
Eq EventTypeSchema Source # | |
Ord EventTypeSchema Source # | |
Show EventTypeSchema Source # | |
Generic EventTypeSchema Source # | |
Hashable EventTypeSchema Source # | |
ToJSON EventTypeSchema Source # | |
FromJSON EventTypeSchema Source # | |
HasNakadiSchemaType EventTypeSchema SchemaType | |
HasNakadiSchema EventTypeSchema Text | |
HasNakadiSchema EventType EventTypeSchema | |
HasNakadiVersion EventTypeSchema (Maybe SchemaVersion) | |
HasNakadiCreatedAt EventTypeSchema (Maybe Timestamp) | |
HasNakadiItems EventTypeSchemasResponse [EventTypeSchema] | |
type Rep EventTypeSchema Source # | |
newtype PaginationLink Source #
PaginationLink
Eq PaginationLink Source # | |
Ord PaginationLink Source # | |
Show PaginationLink Source # | |
Generic PaginationLink Source # | |
Hashable PaginationLink Source # | |
ToJSON PaginationLink Source # | |
FromJSON PaginationLink Source # | |
HasNakadiHref PaginationLink Text | |
HasNakadiPrev PaginationLinks (Maybe PaginationLink) | |
HasNakadiNext PaginationLinks (Maybe PaginationLink) | |
type Rep PaginationLink Source # | |
data PaginationLinks Source #
PaginationLinks
Eq PaginationLinks Source # | |
Ord PaginationLinks Source # | |
Show PaginationLinks Source # | |
Generic PaginationLinks Source # | |
Hashable PaginationLinks Source # | |
ToJSON PaginationLinks Source # | |
FromJSON PaginationLinks Source # | |
HasNakadiLinks EventTypeSchemasResponse PaginationLinks | |
HasNakadiLinks SubscriptionsListResponse PaginationLinks | |
HasNakadiPrev PaginationLinks (Maybe PaginationLink) | |
HasNakadiNext PaginationLinks (Maybe PaginationLink) | |
type Rep PaginationLinks Source # | |
data EventTypeSchemasResponse Source #
EventTypeSchemasResponse
data SubscriptionsListResponse Source #
SubscriptionsListResponse
Type for offset values.
Type for limit values.
data PartitionState Source #
Type for partition states.
data SubscriptionEventTypeStats Source #
Nakadi type SubscriptionEventTypeStats
.
newtype SubscriptionEventTypeStatsResult Source #
SubscriptionEventTypeStatsResult
data EventTypeCategory Source #
Type for the category of an EventType
.
data PartitionStrategy Source #
Type for a partitioning strategy.
data EnrichmentStrategy Source #
Type for an enrichment stragey.
Eq EnrichmentStrategy Source # | |
Ord EnrichmentStrategy Source # | |
Show EnrichmentStrategy Source # | |
Generic EnrichmentStrategy Source # | |
Hashable EnrichmentStrategy Source # | |
ToJSON EnrichmentStrategy Source # | |
FromJSON EnrichmentStrategy Source # | |
HasNakadiEnrichmentStrategies EventType (Maybe [EnrichmentStrategy]) | |
type Rep EnrichmentStrategy Source # | |
data CompatibilityMode Source #
Type for an event type compatibility mode.
Eq CompatibilityMode Source # | |
Ord CompatibilityMode Source # | |
Show CompatibilityMode Source # | |
Generic CompatibilityMode Source # | |
Hashable CompatibilityMode Source # | |
ToJSON CompatibilityMode Source # | |
FromJSON CompatibilityMode Source # | |
HasNakadiCompatibilityMode EventType (Maybe CompatibilityMode) | |
type Rep CompatibilityMode Source # | |
newtype PartitionKeyField Source #
Type for a partitioning key field.
Eq PartitionKeyField Source # | |
Ord PartitionKeyField Source # | |
Show PartitionKeyField Source # | |
IsString PartitionKeyField Source # | |
Generic PartitionKeyField Source # | |
Hashable PartitionKeyField Source # | |
ToJSON PartitionKeyField Source # | |
FromJSON PartitionKeyField Source # | |
HasNakadiPartitionKeyFields EventType (Maybe [PartitionKeyField]) | |
type Rep PartitionKeyField Source # | |
data EventTypeStatistics Source #
Type for event type statistics.
data EventTypeOptions Source #
Type for event type options.
EventType
Eq EventType Source # | |
Ord EventType Source # | |
Show EventType Source # | |
Generic EventType Source # | |
Hashable EventType Source # | |
ToJSON EventType Source # | |
FromJSON EventType Source # | |
HasNakadiSchema EventType EventTypeSchema | |
HasNakadiName EventType EventTypeName | |
HasNakadiPartitionStrategy EventType (Maybe PartitionStrategy) | |
HasNakadiPartitionKeyFields EventType (Maybe [PartitionKeyField]) | |
HasNakadiOwningApplication EventType (Maybe ApplicationName) | |
HasNakadiOptions EventType (Maybe EventTypeOptions) | |
HasNakadiEnrichmentStrategies EventType (Maybe [EnrichmentStrategy]) | |
HasNakadiDefaultStatistic EventType (Maybe EventTypeStatistics) | |
HasNakadiCompatibilityMode EventType (Maybe CompatibilityMode) | |
HasNakadiCategory EventType (Maybe EventTypeCategory) | |
type Rep EventType Source # | |
data EventMetadata Source #
Type of published event metadata values.
EventMetadata | |
|
Eq EventMetadata Source # | |
Show EventMetadata Source # | |
Generic EventMetadata Source # | |
ToJSON EventMetadata Source # | |
FromJSON EventMetadata Source # | |
HasNakadiOccurredAt EventMetadata Timestamp | |
HasNakadiEid EventMetadata EventId | |
HasNakadiPartition EventMetadata (Maybe PartitionName) | |
HasNakadiParentEids EventMetadata (Maybe [EventId]) | |
HasNakadiMetadata (DataChangeEvent a) EventMetadata | |
type Rep EventMetadata Source # | |
data EventMetadataEnriched Source #
Type of event metadata enriched by Nakadi
Eq EventMetadataEnriched Source # | |
Show EventMetadataEnriched Source # | |
Generic EventMetadataEnriched Source # | |
ToJSON EventMetadataEnriched Source # | |
FromJSON EventMetadataEnriched Source # | |
HasNakadiOccurredAt EventMetadataEnriched Timestamp | |
HasNakadiEid EventMetadataEnriched EventId | |
HasNakadiVersion EventMetadataEnriched SchemaVersion | |
HasNakadiReceivedAt EventMetadataEnriched Timestamp | |
HasNakadiEventType EventMetadataEnriched EventTypeName | |
HasNakadiFlowId EventMetadataEnriched (Maybe FlowId) | |
HasNakadiPartition EventMetadataEnriched (Maybe PartitionName) | |
HasNakadiParentEids EventMetadataEnriched (Maybe [EventId]) | |
HasNakadiMetadata (DataChangeEventEnriched a) EventMetadataEnriched | |
type Rep EventMetadataEnriched Source # | |
data EventStreamBatch a Source #
EventStreamBatch
Show a => Show (EventStreamBatch a) Source # | |
Generic (EventStreamBatch a) Source # | |
ToJSON a => ToJSON (EventStreamBatch a) Source # | |
FromJSON a => FromJSON (EventStreamBatch a) Source # | |
HasNakadiCursor (EventStreamBatch a) Cursor | |
HasNakadiEvents (EventStreamBatch a) (Maybe (Vector a)) | |
type Rep (EventStreamBatch a) Source # | |
data SubscriptionEventStreamBatch a Source #
SubscriptionEventStreamBatch
SubscriptionEventStreamBatch | |
|
Show a => Show (SubscriptionEventStreamBatch a) Source # | |
Generic (SubscriptionEventStreamBatch a) Source # | |
ToJSON a => ToJSON (SubscriptionEventStreamBatch a) Source # | |
FromJSON a => FromJSON (SubscriptionEventStreamBatch a) Source # | |
HasNakadiSubscriptionCursor (SubscriptionEventStreamBatch a) | |
HasNakadiCursor (SubscriptionEventStreamBatch a) SubscriptionCursor | |
HasNakadiEvents (SubscriptionEventStreamBatch a) (Maybe (Vector a)) | |
type Rep (SubscriptionEventStreamBatch a) Source # | |
Type for "data_op" as contained in the DataChangeEvent.
data DataChangeEvent a Source #
DataChangeEvent
Eq a => Eq (DataChangeEvent a) Source # | |
Show a => Show (DataChangeEvent a) Source # | |
Generic (DataChangeEvent a) Source # | |
ToJSON a => ToJSON (DataChangeEvent a) Source # | |
FromJSON a => FromJSON (DataChangeEvent a) Source # | |
HasNakadiPayload (DataChangeEvent a) a | |
HasNakadiMetadata (DataChangeEvent a) EventMetadata | |
HasNakadiDataType (DataChangeEvent a) Text | |
HasNakadiDataOp (DataChangeEvent a) DataOp | |
type Rep (DataChangeEvent a) Source # | |
data DataChangeEventEnriched a Source #
A DataChangeEvent enriched by Nakadi
Eq a => Eq (DataChangeEventEnriched a) Source # | |
Show a => Show (DataChangeEventEnriched a) Source # | |
Generic (DataChangeEventEnriched a) Source # | |
ToJSON a => ToJSON (DataChangeEventEnriched a) Source # | |
FromJSON a => FromJSON (DataChangeEventEnriched a) Source # | |
HasNakadiPayload (DataChangeEventEnriched a) a | |
HasNakadiMetadata (DataChangeEventEnriched a) EventMetadataEnriched | |
HasNakadiDataType (DataChangeEventEnriched a) Text | |
HasNakadiDataOp (DataChangeEventEnriched a) DataOp | |
type Rep (DataChangeEventEnriched a) Source # | |
makeFieldRenamer :: [(String, String)] -> String -> String Source #
Construct a field renamer function from a field renamer map.
class (Monad b, Monad m) => MonadNakadiBase b m where Source #
nakadiLiftBase :: b a -> m a Source #
nakadiLiftBase :: (MonadNakadiBase b n, MonadTrans t, m ~ t n) => b a -> m a Source #
MonadNakadiBase IO IO Source # | |
MonadNakadiBase b m => MonadNakadiBase b (ResourceT m) Source # | |
MonadNakadiBase b m => MonadNakadiBase b (NoLoggingT m) Source # | |
MonadNakadiBase b m => MonadNakadiBase b (LoggingT m) Source # | |
MonadNakadiBase b m => MonadNakadiBase b (StateT s m) Source # | |
MonadNakadiBase b m => MonadNakadiBase b (StateT s m) Source # | |
(MonadNakadiBase b m, Monoid w) => MonadNakadiBase b (WriterT w m) Source # | |
(MonadNakadiBase b m, Monoid w) => MonadNakadiBase b (WriterT w m) Source # | |
MonadNakadiBase b m => MonadNakadiBase b (NakadiT b m) Source # | |
MonadNakadiBase b m => MonadNakadiBase b (ReaderT * r m) Source # | |
Monad m => MonadNakadiBase (LoggingT (ReaderT * r m)) (LoggingT (ReaderT * r m)) Source # | |
Monad m => MonadNakadiBase (NakadiBaseT m) (NakadiBaseT m) Source # | |
Monad m => MonadNakadiBase (ReaderT * r m) (ReaderT * r m) Source # | |
newtype NakadiBaseT m a Source #
NakadiBaseT | |
|
MonadTrans NakadiBaseT Source # | |
MonadReader r m => MonadReader r (NakadiBaseT m) Source # | |
MonadState s m => MonadState s (NakadiBaseT m) Source # | |
MonadBase b m => MonadBase b (NakadiBaseT m) Source # | |
MonadWriter w m => MonadWriter w (NakadiBaseT m) Source # | |
Monad m => Monad (NakadiBaseT m) Source # | |
Functor m => Functor (NakadiBaseT m) Source # | |
Applicative m => Applicative (NakadiBaseT m) Source # | |
MonadIO m => MonadIO (NakadiBaseT m) Source # | |
MonadThrow m => MonadThrow (NakadiBaseT m) Source # | |
MonadCatch m => MonadCatch (NakadiBaseT m) Source # | |
MonadMask m => MonadMask (NakadiBaseT m) Source # | |
MonadLogger m => MonadLogger (NakadiBaseT m) Source # | |
Monad m => MonadNakadiBase (NakadiBaseT m) (NakadiBaseT m) Source # | |
class (MonadNakadiBase b m, MonadThrow b, MonadMask b, MonadThrow m, MonadCatch m) => MonadNakadi b m | m -> b where Source #
The MonadNakadi
typeclass is implemented by monads in which
Nakadi can be called. The first parameter (b
) denotes the `base
monad`. This is the monad in which the core actions are run. This
includes executing (non-streaming) HTTP requests and running
user-provided callbacks. The typeclass provides methods for
* retrieving the Nakadi configuration
* locally changing the Nakadi configuration
* extracting specific Nakadi configuration values
* lifting actions from the
The MonadNakadi
typeclass is modelled closely after MonadReader
.
nakadiAsk :: m (Config b) Source #
nakadiAsk :: (MonadNakadi b n, MonadTrans t, m ~ t n) => m (Config b) Source #
MonadNakadi b m => MonadNakadi b (ResourceT m) Source # | |
MonadNakadi b m => MonadNakadi b (NoLoggingT m) Source # | |
MonadNakadi b m => MonadNakadi b (LoggingT m) Source # | |
MonadNakadi b m => MonadNakadi b (StateT s m) Source # |
|
MonadNakadi b m => MonadNakadi b (StateT s m) Source # |
|
(MonadNakadi b m, Monoid w) => MonadNakadi b (WriterT w m) Source # |
|
(MonadNakadi b m, Monoid w) => MonadNakadi b (WriterT w m) Source # |
|
(MonadCatch m, MonadMask b, MonadNakadiBase b (NakadiT b m)) => MonadNakadi b (NakadiT b m) Source # | |
(MonadMask b, MonadCatch m, MonadNakadiBase b (ReaderT * r m), HasNakadiConfig b r) => MonadNakadi b (ReaderT * r m) Source # | |
type MonadNakadiIO = MonadNakadi IO Source #
newtype NakadiT b m a Source #
NakadiT | |
|
runNakadiT :: Config b -> NakadiT b m a -> m a Source #
httpJsonBody :: (MonadNakadi b m, FromJSON a) => Status -> [(Status, ByteString -> m NakadiException)] -> (Request -> Request) -> m a Source #
httpJsonNoBody :: MonadNakadi b m => Status -> [(Status, ByteString -> m NakadiException)] -> (Request -> Request) -> m () Source #
httpJsonBodyStream :: forall b m r. (MonadNakadi b m, MonadMask m) => Status -> [(Status, ByteString -> m NakadiException)] -> (Request -> Request) -> (Response (ConduitM () ByteString m ()) -> m r) -> m r Source #
:: MonadNakadi b m | |
=> (Request -> Request) | Pure request modifier |
-> m Request | Resulting request to execute |
:: (FromJSON a, MonadNakadi b m) | |
=> Config b | Configuration, containing the deserialization-failure-callback. |
-> ConduitM ByteString a m () | Conduit deserializing bytestrings into custom values |
If no deserializationFailureCallback is set in the provided configuration (which is the default), a DeserializationFailureCallback exception will be thrown. Otherwise, simply run the callback.
errorClientNotAuthenticated :: MonadThrow m => ByteString -> m NakadiException Source #
errorUnprocessableEntity :: MonadThrow m => ByteString -> m NakadiException Source #
errorAccessForbidden :: MonadThrow m => ByteString -> m NakadiException Source #
errorTooManyRequests :: MonadThrow m => ByteString -> m NakadiException Source #
errorBadRequest :: MonadThrow m => ByteString -> m NakadiException Source #
errorSubscriptionNotFound :: MonadThrow m => ByteString -> m NakadiException Source #
errorCursorAlreadyCommitted :: MonadThrow m => ByteString -> m NakadiException Source #
errorCursorResetInProgress :: MonadThrow m => ByteString -> m NakadiException Source #
errorEventTypeNotFound :: MonadThrow m => ByteString -> m NakadiException Source #
errorSubscriptionExistsAlready :: MonadThrow m => ByteString -> m NakadiException Source #
errorBatchPartiallySubmitted :: MonadThrow m => ByteString -> m NakadiException Source #
errorBatchNotSubmitted :: MonadThrow m => ByteString -> m NakadiException Source #
setRequestQueryParameters :: [(ByteString, ByteString)] -> Request -> Request Source #