Safe Haskell | None |
---|---|
Language | Haskell2010 |
Kafka.Metadata
Description
Module with metadata types and functions.
Synopsis
- data KafkaMetadata = KafkaMetadata {
- kmBrokers :: [BrokerMetadata]
- kmTopics :: [TopicMetadata]
- kmOrigBroker :: !BrokerId
- data BrokerMetadata = BrokerMetadata {
- bmBrokerId :: !BrokerId
- bmBrokerHost :: !Text
- bmBrokerPort :: !Int
- data TopicMetadata = TopicMetadata {}
- data PartitionMetadata = PartitionMetadata {
- pmPartitionId :: !PartitionId
- pmError :: Maybe KafkaError
- pmLeader :: !BrokerId
- pmReplicas :: [BrokerId]
- pmInSyncReplicas :: [BrokerId]
- data WatermarkOffsets = WatermarkOffsets {}
- newtype GroupMemberId = GroupMemberId Text
- data GroupMemberInfo = GroupMemberInfo {}
- newtype GroupProtocolType = GroupProtocolType Text
- newtype GroupProtocol = GroupProtocol Text
- data GroupState
- data GroupInfo = GroupInfo {}
- allTopicsMetadata :: (MonadIO m, HasKafka k) => k -> Timeout -> m (Either KafkaError KafkaMetadata)
- topicMetadata :: (MonadIO m, HasKafka k) => k -> Timeout -> TopicName -> m (Either KafkaError KafkaMetadata)
- watermarkOffsets :: (MonadIO m, HasKafka k) => k -> Timeout -> TopicName -> m [Either KafkaError WatermarkOffsets]
- watermarkOffsets' :: (MonadIO m, HasKafka k) => k -> Timeout -> TopicMetadata -> m [Either KafkaError WatermarkOffsets]
- partitionWatermarkOffsets :: (MonadIO m, HasKafka k) => k -> Timeout -> TopicName -> PartitionId -> m (Either KafkaError WatermarkOffsets)
- offsetsForTime :: (MonadIO m, HasKafka k) => k -> Timeout -> Millis -> [(TopicName, PartitionId)] -> m (Either KafkaError [TopicPartition])
- offsetsForTime' :: (MonadIO m, HasKafka k) => k -> Timeout -> Millis -> TopicMetadata -> m (Either KafkaError [TopicPartition])
- topicOffsetsForTime :: (MonadIO m, HasKafka k) => k -> Timeout -> Millis -> TopicName -> m (Either KafkaError [TopicPartition])
- allConsumerGroupsInfo :: (MonadIO m, HasKafka k) => k -> Timeout -> m (Either KafkaError [GroupInfo])
- consumerGroupInfo :: (MonadIO m, HasKafka k) => k -> Timeout -> ConsumerGroupId -> m (Either KafkaError [GroupInfo])
Documentation
data KafkaMetadata Source #
Constructors
KafkaMetadata | |
Fields
|
Instances
data BrokerMetadata Source #
Constructors
BrokerMetadata | |
Fields
|
Instances
Generic BrokerMetadata Source # | |||||
Defined in Kafka.Metadata Associated Types
Methods from :: BrokerMetadata -> Rep BrokerMetadata x # to :: Rep BrokerMetadata x -> BrokerMetadata # | |||||
Show BrokerMetadata Source # | |||||
Defined in Kafka.Metadata Methods showsPrec :: Int -> BrokerMetadata -> ShowS # show :: BrokerMetadata -> String # showList :: [BrokerMetadata] -> ShowS # | |||||
Eq BrokerMetadata Source # | |||||
Defined in Kafka.Metadata Methods (==) :: BrokerMetadata -> BrokerMetadata -> Bool # (/=) :: BrokerMetadata -> BrokerMetadata -> Bool # | |||||
type Rep BrokerMetadata Source # | |||||
Defined in Kafka.Metadata type Rep BrokerMetadata = D1 ('MetaData "BrokerMetadata" "Kafka.Metadata" "hw-kafka-client-5.3.0-6F0nERM3YC6BKbbrjPfHDJ" 'False) (C1 ('MetaCons "BrokerMetadata" 'PrefixI 'True) (S1 ('MetaSel ('Just "bmBrokerId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BrokerId) :*: (S1 ('MetaSel ('Just "bmBrokerHost") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "bmBrokerPort") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)))) |
data TopicMetadata Source #
Constructors
TopicMetadata | |
Fields
|
Instances
Generic TopicMetadata Source # | |||||
Defined in Kafka.Metadata Associated Types
| |||||
Show TopicMetadata Source # | |||||
Defined in Kafka.Metadata Methods showsPrec :: Int -> TopicMetadata -> ShowS # show :: TopicMetadata -> String # showList :: [TopicMetadata] -> ShowS # | |||||
Eq TopicMetadata Source # | |||||
Defined in Kafka.Metadata Methods (==) :: TopicMetadata -> TopicMetadata -> Bool # (/=) :: TopicMetadata -> TopicMetadata -> Bool # | |||||
type Rep TopicMetadata Source # | |||||
Defined in Kafka.Metadata type Rep TopicMetadata = D1 ('MetaData "TopicMetadata" "Kafka.Metadata" "hw-kafka-client-5.3.0-6F0nERM3YC6BKbbrjPfHDJ" 'False) (C1 ('MetaCons "TopicMetadata" 'PrefixI 'True) (S1 ('MetaSel ('Just "tmTopicName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TopicName) :*: (S1 ('MetaSel ('Just "tmPartitions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [PartitionMetadata]) :*: S1 ('MetaSel ('Just "tmError") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe KafkaError))))) |
data PartitionMetadata Source #
Constructors
PartitionMetadata | |
Fields
|
Instances
Generic PartitionMetadata Source # | |||||
Defined in Kafka.Metadata Associated Types
Methods from :: PartitionMetadata -> Rep PartitionMetadata x # to :: Rep PartitionMetadata x -> PartitionMetadata # | |||||
Show PartitionMetadata Source # | |||||
Defined in Kafka.Metadata Methods showsPrec :: Int -> PartitionMetadata -> ShowS # show :: PartitionMetadata -> String # showList :: [PartitionMetadata] -> ShowS # | |||||
Eq PartitionMetadata Source # | |||||
Defined in Kafka.Metadata Methods (==) :: PartitionMetadata -> PartitionMetadata -> Bool # (/=) :: PartitionMetadata -> PartitionMetadata -> Bool # | |||||
type Rep PartitionMetadata Source # | |||||
Defined in Kafka.Metadata type Rep PartitionMetadata = D1 ('MetaData "PartitionMetadata" "Kafka.Metadata" "hw-kafka-client-5.3.0-6F0nERM3YC6BKbbrjPfHDJ" 'False) (C1 ('MetaCons "PartitionMetadata" 'PrefixI 'True) ((S1 ('MetaSel ('Just "pmPartitionId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PartitionId) :*: S1 ('MetaSel ('Just "pmError") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe KafkaError))) :*: (S1 ('MetaSel ('Just "pmLeader") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BrokerId) :*: (S1 ('MetaSel ('Just "pmReplicas") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [BrokerId]) :*: S1 ('MetaSel ('Just "pmInSyncReplicas") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [BrokerId]))))) |
data WatermarkOffsets Source #
Constructors
WatermarkOffsets | |
Fields
|
Instances
Generic WatermarkOffsets Source # | |||||
Defined in Kafka.Metadata Associated Types
Methods from :: WatermarkOffsets -> Rep WatermarkOffsets x # to :: Rep WatermarkOffsets x -> WatermarkOffsets # | |||||
Show WatermarkOffsets Source # | |||||
Defined in Kafka.Metadata Methods showsPrec :: Int -> WatermarkOffsets -> ShowS # show :: WatermarkOffsets -> String # showList :: [WatermarkOffsets] -> ShowS # | |||||
Eq WatermarkOffsets Source # | |||||
Defined in Kafka.Metadata Methods (==) :: WatermarkOffsets -> WatermarkOffsets -> Bool # (/=) :: WatermarkOffsets -> WatermarkOffsets -> Bool # | |||||
type Rep WatermarkOffsets Source # | |||||
Defined in Kafka.Metadata type Rep WatermarkOffsets = D1 ('MetaData "WatermarkOffsets" "Kafka.Metadata" "hw-kafka-client-5.3.0-6F0nERM3YC6BKbbrjPfHDJ" 'False) (C1 ('MetaCons "WatermarkOffsets" 'PrefixI 'True) ((S1 ('MetaSel ('Just "woTopicName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TopicName) :*: S1 ('MetaSel ('Just "woPartitionId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PartitionId)) :*: (S1 ('MetaSel ('Just "woLowWatermark") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Offset) :*: S1 ('MetaSel ('Just "woHighWatermark") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Offset)))) |
newtype GroupMemberId Source #
Constructors
GroupMemberId Text |
Instances
Read GroupMemberId Source # | |
Defined in Kafka.Metadata Methods readsPrec :: Int -> ReadS GroupMemberId # readList :: ReadS [GroupMemberId] # | |
Show GroupMemberId Source # | |
Defined in Kafka.Metadata Methods showsPrec :: Int -> GroupMemberId -> ShowS # show :: GroupMemberId -> String # showList :: [GroupMemberId] -> ShowS # | |
Eq GroupMemberId Source # | |
Defined in Kafka.Metadata Methods (==) :: GroupMemberId -> GroupMemberId -> Bool # (/=) :: GroupMemberId -> GroupMemberId -> Bool # | |
Ord GroupMemberId Source # | |
Defined in Kafka.Metadata Methods compare :: GroupMemberId -> GroupMemberId -> Ordering # (<) :: GroupMemberId -> GroupMemberId -> Bool # (<=) :: GroupMemberId -> GroupMemberId -> Bool # (>) :: GroupMemberId -> GroupMemberId -> Bool # (>=) :: GroupMemberId -> GroupMemberId -> Bool # max :: GroupMemberId -> GroupMemberId -> GroupMemberId # min :: GroupMemberId -> GroupMemberId -> GroupMemberId # |
data GroupMemberInfo Source #
Constructors
GroupMemberInfo | |
Fields
|
Instances
Generic GroupMemberInfo Source # | |||||
Defined in Kafka.Metadata Associated Types
Methods from :: GroupMemberInfo -> Rep GroupMemberInfo x # to :: Rep GroupMemberInfo x -> GroupMemberInfo # | |||||
Show GroupMemberInfo Source # | |||||
Defined in Kafka.Metadata Methods showsPrec :: Int -> GroupMemberInfo -> ShowS # show :: GroupMemberInfo -> String # showList :: [GroupMemberInfo] -> ShowS # | |||||
Eq GroupMemberInfo Source # | |||||
Defined in Kafka.Metadata Methods (==) :: GroupMemberInfo -> GroupMemberInfo -> Bool # (/=) :: GroupMemberInfo -> GroupMemberInfo -> Bool # | |||||
type Rep GroupMemberInfo Source # | |||||
Defined in Kafka.Metadata type Rep GroupMemberInfo = D1 ('MetaData "GroupMemberInfo" "Kafka.Metadata" "hw-kafka-client-5.3.0-6F0nERM3YC6BKbbrjPfHDJ" 'False) (C1 ('MetaCons "GroupMemberInfo" 'PrefixI 'True) ((S1 ('MetaSel ('Just "gmiMemberId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GroupMemberId) :*: S1 ('MetaSel ('Just "gmiClientId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ClientId)) :*: (S1 ('MetaSel ('Just "gmiClientHost") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "gmiMetadata") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByteString) :*: S1 ('MetaSel ('Just "gmiAssignment") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByteString))))) |
newtype GroupProtocolType Source #
Constructors
GroupProtocolType Text |
Instances
Generic GroupProtocolType Source # | |||||
Defined in Kafka.Metadata Associated Types
Methods from :: GroupProtocolType -> Rep GroupProtocolType x # to :: Rep GroupProtocolType x -> GroupProtocolType # | |||||
Read GroupProtocolType Source # | |||||
Defined in Kafka.Metadata Methods readsPrec :: Int -> ReadS GroupProtocolType # readList :: ReadS [GroupProtocolType] # | |||||
Show GroupProtocolType Source # | |||||
Defined in Kafka.Metadata Methods showsPrec :: Int -> GroupProtocolType -> ShowS # show :: GroupProtocolType -> String # showList :: [GroupProtocolType] -> ShowS # | |||||
Eq GroupProtocolType Source # | |||||
Defined in Kafka.Metadata Methods (==) :: GroupProtocolType -> GroupProtocolType -> Bool # (/=) :: GroupProtocolType -> GroupProtocolType -> Bool # | |||||
Ord GroupProtocolType Source # | |||||
Defined in Kafka.Metadata Methods compare :: GroupProtocolType -> GroupProtocolType -> Ordering # (<) :: GroupProtocolType -> GroupProtocolType -> Bool # (<=) :: GroupProtocolType -> GroupProtocolType -> Bool # (>) :: GroupProtocolType -> GroupProtocolType -> Bool # (>=) :: GroupProtocolType -> GroupProtocolType -> Bool # max :: GroupProtocolType -> GroupProtocolType -> GroupProtocolType # min :: GroupProtocolType -> GroupProtocolType -> GroupProtocolType # | |||||
type Rep GroupProtocolType Source # | |||||
Defined in Kafka.Metadata type Rep GroupProtocolType = D1 ('MetaData "GroupProtocolType" "Kafka.Metadata" "hw-kafka-client-5.3.0-6F0nERM3YC6BKbbrjPfHDJ" 'True) (C1 ('MetaCons "GroupProtocolType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) |
newtype GroupProtocol Source #
Constructors
GroupProtocol Text |
Instances
Generic GroupProtocol Source # | |||||
Defined in Kafka.Metadata Associated Types
| |||||
Read GroupProtocol Source # | |||||
Defined in Kafka.Metadata Methods readsPrec :: Int -> ReadS GroupProtocol # readList :: ReadS [GroupProtocol] # | |||||
Show GroupProtocol Source # | |||||
Defined in Kafka.Metadata Methods showsPrec :: Int -> GroupProtocol -> ShowS # show :: GroupProtocol -> String # showList :: [GroupProtocol] -> ShowS # | |||||
Eq GroupProtocol Source # | |||||
Defined in Kafka.Metadata Methods (==) :: GroupProtocol -> GroupProtocol -> Bool # (/=) :: GroupProtocol -> GroupProtocol -> Bool # | |||||
Ord GroupProtocol Source # | |||||
Defined in Kafka.Metadata Methods compare :: GroupProtocol -> GroupProtocol -> Ordering # (<) :: GroupProtocol -> GroupProtocol -> Bool # (<=) :: GroupProtocol -> GroupProtocol -> Bool # (>) :: GroupProtocol -> GroupProtocol -> Bool # (>=) :: GroupProtocol -> GroupProtocol -> Bool # max :: GroupProtocol -> GroupProtocol -> GroupProtocol # min :: GroupProtocol -> GroupProtocol -> GroupProtocol # | |||||
type Rep GroupProtocol Source # | |||||
Defined in Kafka.Metadata type Rep GroupProtocol = D1 ('MetaData "GroupProtocol" "Kafka.Metadata" "hw-kafka-client-5.3.0-6F0nERM3YC6BKbbrjPfHDJ" 'True) (C1 ('MetaCons "GroupProtocol" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) |
data GroupState Source #
Constructors
GroupPreparingRebalance | Group is preparing to rebalance |
GroupEmpty | Group has no more members, but lingers until all offsets have expired |
GroupAwaitingSync | Group is awaiting state assignment from the leader |
GroupStable | Group is stable |
GroupDead | Group has no more members and its metadata is being removed |
Instances
Generic GroupState Source # | |||||
Defined in Kafka.Metadata Associated Types
| |||||
Read GroupState Source # | |||||
Defined in Kafka.Metadata Methods readsPrec :: Int -> ReadS GroupState # readList :: ReadS [GroupState] # readPrec :: ReadPrec GroupState # readListPrec :: ReadPrec [GroupState] # | |||||
Show GroupState Source # | |||||
Defined in Kafka.Metadata Methods showsPrec :: Int -> GroupState -> ShowS # show :: GroupState -> String # showList :: [GroupState] -> ShowS # | |||||
Eq GroupState Source # | |||||
Defined in Kafka.Metadata | |||||
Ord GroupState Source # | |||||
Defined in Kafka.Metadata Methods compare :: GroupState -> GroupState -> Ordering # (<) :: GroupState -> GroupState -> Bool # (<=) :: GroupState -> GroupState -> Bool # (>) :: GroupState -> GroupState -> Bool # (>=) :: GroupState -> GroupState -> Bool # max :: GroupState -> GroupState -> GroupState # min :: GroupState -> GroupState -> GroupState # | |||||
type Rep GroupState Source # | |||||
Defined in Kafka.Metadata type Rep GroupState = D1 ('MetaData "GroupState" "Kafka.Metadata" "hw-kafka-client-5.3.0-6F0nERM3YC6BKbbrjPfHDJ" 'False) ((C1 ('MetaCons "GroupPreparingRebalance" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GroupEmpty" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "GroupAwaitingSync" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "GroupStable" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GroupDead" 'PrefixI 'False) (U1 :: Type -> Type)))) |
Constructors
GroupInfo | |
Fields
|
Instances
Generic GroupInfo Source # | |||||
Defined in Kafka.Metadata Associated Types
| |||||
Show GroupInfo Source # | |||||
Eq GroupInfo Source # | |||||
type Rep GroupInfo Source # | |||||
Defined in Kafka.Metadata type Rep GroupInfo = D1 ('MetaData "GroupInfo" "Kafka.Metadata" "hw-kafka-client-5.3.0-6F0nERM3YC6BKbbrjPfHDJ" 'False) (C1 ('MetaCons "GroupInfo" 'PrefixI 'True) ((S1 ('MetaSel ('Just "giGroup") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ConsumerGroupId) :*: (S1 ('MetaSel ('Just "giError") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe KafkaError)) :*: S1 ('MetaSel ('Just "giState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GroupState))) :*: (S1 ('MetaSel ('Just "giProtocolType") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GroupProtocolType) :*: (S1 ('MetaSel ('Just "giProtocol") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GroupProtocol) :*: S1 ('MetaSel ('Just "giMembers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [GroupMemberInfo]))))) |
allTopicsMetadata :: (MonadIO m, HasKafka k) => k -> Timeout -> m (Either KafkaError KafkaMetadata) Source #
Returns metadata for all topics in the cluster
topicMetadata :: (MonadIO m, HasKafka k) => k -> Timeout -> TopicName -> m (Either KafkaError KafkaMetadata) Source #
Returns metadata only for specified topic
watermarkOffsets :: (MonadIO m, HasKafka k) => k -> Timeout -> TopicName -> m [Either KafkaError WatermarkOffsets] Source #
Query broker for low (oldestbeginning) and high (newestend) offsets for a given topic.
watermarkOffsets' :: (MonadIO m, HasKafka k) => k -> Timeout -> TopicMetadata -> m [Either KafkaError WatermarkOffsets] Source #
Query broker for low (oldestbeginning) and high (newestend) offsets for a given topic.
partitionWatermarkOffsets :: (MonadIO m, HasKafka k) => k -> Timeout -> TopicName -> PartitionId -> m (Either KafkaError WatermarkOffsets) Source #
Query broker for low (oldestbeginning) and high (newestend) offsets for a specific partition
offsetsForTime :: (MonadIO m, HasKafka k) => k -> Timeout -> Millis -> [(TopicName, PartitionId)] -> m (Either KafkaError [TopicPartition]) Source #
Look up the offsets for the given partitions by timestamp.
The returned offset for each partition is the earliest offset whose timestamp is greater than or equal to the given timestamp in the corresponding partition.
offsetsForTime' :: (MonadIO m, HasKafka k) => k -> Timeout -> Millis -> TopicMetadata -> m (Either KafkaError [TopicPartition]) Source #
Look up the offsets for the given metadata by timestamp.
The returned offset for each partition is the earliest offset whose timestamp is greater than or equal to the given timestamp in the corresponding partition.
topicOffsetsForTime :: (MonadIO m, HasKafka k) => k -> Timeout -> Millis -> TopicName -> m (Either KafkaError [TopicPartition]) Source #
Look up the offsets for the given topic by timestamp.
The returned offset for each partition is the earliest offset whose timestamp is greater than or equal to the given timestamp in the corresponding partition.
allConsumerGroupsInfo :: (MonadIO m, HasKafka k) => k -> Timeout -> m (Either KafkaError [GroupInfo]) Source #
List and describe all consumer groups in cluster.
consumerGroupInfo :: (MonadIO m, HasKafka k) => k -> Timeout -> ConsumerGroupId -> m (Either KafkaError [GroupInfo]) Source #
Describe a given consumer group.