| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Database.Franz.Internal.Protocol
Synopsis
- apiVersion :: ByteString
- defaultPort :: PortNumber
- type IndexName = ByteString
- newtype StreamName = StreamName {}
- streamNameToPath :: StreamName -> FilePath
- data FranzException
- data RequestType
- data ItemRef
- data Query = Query {
- reqStream :: !StreamName
- reqFrom :: !ItemRef
- reqTo :: !ItemRef
- reqType :: !RequestType
- data RawRequest
- type ResponseId = Int
- data ResponseHeader
- data PayloadHeader = PayloadHeader !Int !Int !Int !(Vector IndexName)
Documentation
type IndexName = ByteString Source #
newtype StreamName Source #
Constructors
| StreamName | |
Fields | |
Instances
| Eq StreamName Source # | |
Defined in Database.Franz.Internal.Protocol | |
| Ord StreamName Source # | |
Defined in Database.Franz.Internal.Protocol Methods compare :: StreamName -> StreamName -> Ordering # (<) :: StreamName -> StreamName -> Bool # (<=) :: StreamName -> StreamName -> Bool # (>) :: StreamName -> StreamName -> Bool # (>=) :: StreamName -> StreamName -> Bool # max :: StreamName -> StreamName -> StreamName # min :: StreamName -> StreamName -> StreamName # | |
| Show StreamName Source # | |
Defined in Database.Franz.Internal.Protocol Methods showsPrec :: Int -> StreamName -> ShowS # show :: StreamName -> String # showList :: [StreamName] -> ShowS # | |
| IsString StreamName Source # | UTF-8 encoded |
Defined in Database.Franz.Internal.Protocol Methods fromString :: String -> StreamName # | |
| Serialize StreamName Source # | |
Defined in Database.Franz.Internal.Protocol | |
| Hashable StreamName Source # | |
Defined in Database.Franz.Internal.Protocol | |
data FranzException Source #
Constructors
| MalformedRequest !String | |
| StreamNotFound !FilePath | |
| IndexNotFound !IndexName ![IndexName] | |
| InternalError !String | |
| ClientError !String |
Instances
data RequestType Source #
Instances
| Eq RequestType Source # | |
Defined in Database.Franz.Internal.Protocol | |
| Show RequestType Source # | |
Defined in Database.Franz.Internal.Protocol Methods showsPrec :: Int -> RequestType -> ShowS # show :: RequestType -> String # showList :: [RequestType] -> ShowS # | |
| Generic RequestType Source # | |
Defined in Database.Franz.Internal.Protocol Associated Types type Rep RequestType :: Type -> Type # | |
| Serialize RequestType Source # | |
Defined in Database.Franz.Internal.Protocol | |
| type Rep RequestType Source # | |
Defined in Database.Franz.Internal.Protocol type Rep RequestType = D1 ('MetaData "RequestType" "Database.Franz.Internal.Protocol" "franz-0.5.3-EuajUv7clyI2O3Dd5zy1gg" 'False) (C1 ('MetaCons "AllItems" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LastItem" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FirstItem" 'PrefixI 'False) (U1 :: Type -> Type))) | |
Instances
| Eq ItemRef Source # | |
| Show ItemRef Source # | |
| Generic ItemRef Source # | |
| Serialize ItemRef Source # | |
| type Rep ItemRef Source # | |
Defined in Database.Franz.Internal.Protocol type Rep ItemRef = D1 ('MetaData "ItemRef" "Database.Franz.Internal.Protocol" "franz-0.5.3-EuajUv7clyI2O3Dd5zy1gg" 'False) (C1 ('MetaCons "BySeqNum" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :+: C1 ('MetaCons "ByIndex" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 IndexName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int))) | |
Constructors
| Query | |
Fields
| |
Instances
| Eq Query Source # | |
| Show Query Source # | |
| Generic Query Source # | |
| Serialize Query Source # | |
| type Rep Query Source # | |
Defined in Database.Franz.Internal.Protocol type Rep Query = D1 ('MetaData "Query" "Database.Franz.Internal.Protocol" "franz-0.5.3-EuajUv7clyI2O3Dd5zy1gg" 'False) (C1 ('MetaCons "Query" 'PrefixI 'True) ((S1 ('MetaSel ('Just "reqStream") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 StreamName) :*: S1 ('MetaSel ('Just "reqFrom") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ItemRef)) :*: (S1 ('MetaSel ('Just "reqTo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ItemRef) :*: S1 ('MetaSel ('Just "reqType") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RequestType)))) | |
data RawRequest Source #
Constructors
| RawRequest !ResponseId !Query | |
| RawClean !ResponseId |
Instances
| Generic RawRequest Source # | |
Defined in Database.Franz.Internal.Protocol Associated Types type Rep RawRequest :: Type -> Type # | |
| Serialize RawRequest Source # | |
Defined in Database.Franz.Internal.Protocol | |
| type Rep RawRequest Source # | |
Defined in Database.Franz.Internal.Protocol type Rep RawRequest = D1 ('MetaData "RawRequest" "Database.Franz.Internal.Protocol" "franz-0.5.3-EuajUv7clyI2O3Dd5zy1gg" 'False) (C1 ('MetaCons "RawRequest" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ResponseId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Query)) :+: C1 ('MetaCons "RawClean" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ResponseId))) | |
type ResponseId = Int Source #
data ResponseHeader Source #
Constructors
| Response !ResponseId | response ID, number of streams; there are items satisfying the query |
| ResponseWait !ResponseId | response ID; requested elements are not available right now |
| ResponseError !ResponseId !FranzException | something went wrong |
Instances
data PayloadHeader Source #
Initial seqno, final seqno, base offset, index names