Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Response = Response {
- throttleTimeMilliseconds :: !Int32
- brokers :: !(SmallArray Broker)
- clusterId :: !Text
- controllerId :: !Int32
- topics :: !(SmallArray Topic)
- taggedFields :: !(SmallArray TaggedField)
- data Broker = Broker {
- nodeId :: !Int32
- host :: !Text
- port :: !Word16
- rack :: !Text
- taggedFields :: !(SmallArray TaggedField)
- data Topic = Topic {
- errorCode :: !ErrorCode
- name :: !Text
- id :: !Word128
- internal :: !Bool
- partitions :: !(SmallArray Partition)
- authorizedOperations :: !Word32
- taggedFields :: !(SmallArray TaggedField)
- data Partition = Partition {
- errorCode :: !ErrorCode
- index :: !Int32
- leaderId :: !Int32
- leaderEpoch :: !Int32
- replicaNodes :: !(PrimArray Int32)
- isrNodes :: !(PrimArray Int32)
- offlineReplicas :: !(PrimArray Int32)
- taggedFields :: !(SmallArray TaggedField)
- data Error = Error {
- index :: !Int32
- message :: !Text
- taggedFields :: !(SmallArray TaggedField)
- parser :: Context -> Parser Context s Response
- decode :: Bytes -> Either Context Response
- decodeHeaded :: Bytes -> Either Context (Headed Response)
- hasErrorCode :: Response -> Bool
- findErrorCode :: Response -> Maybe ContextualizedErrorCode
Documentation
Response | |
|
Broker | |
|
Topic | |
|
Partition | |
|
Error | |
|
Predicates
hasErrorCode :: Response -> Bool Source #
Search through all topics and partitions for any error codes
that are not set to NONE
.
findErrorCode :: Response -> Maybe ContextualizedErrorCode Source #
Find the first error code of any kind in the response. This looks for topic-level error codes first and then moves on searching for partition-level error codes.