Copyright | (c) Abhinav Gupta 2015 |
---|---|
License | BSD3 |
Maintainer | Abhinav Gupta <mail@abhinavg.net> |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Pinch.Internal.Message
Description
Message wrapper for Thrift payloads. Normal Thrift requests sent over the wire are wrapped inside a message envelope that contains information about the method being called, the type of message, etc. This information is essential for the RPC system to function.
Synopsis
- data Message = Message {
- messageName :: !Text
- messageType :: !MessageType
- messageId :: !Int32
- messagePayload :: !(Value TStruct)
- data MessageType
Documentation
Message envelope for Thrift payloads.
Constructors
Message | |
Fields
|
Instances
Generic Message Source # | |
Show Message Source # | |
NFData Message Source # | |
Defined in Pinch.Internal.Message | |
Eq Message Source # | |
type Rep Message Source # | |
Defined in Pinch.Internal.Message type Rep Message = D1 ('MetaData "Message" "Pinch.Internal.Message" "pinch-0.4.3.0-IP3NIMX7ovVBCBsW5ZUwO6" 'False) (C1 ('MetaCons "Message" 'PrefixI 'True) ((S1 ('MetaSel ('Just "messageName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "messageType") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MessageType)) :*: (S1 ('MetaSel ('Just "messageId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int32) :*: S1 ('MetaSel ('Just "messagePayload") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Value TStruct))))) |
data MessageType Source #
Type of message being sent.
Constructors
Call | A call to a specific method. The message body is the request arguments struct. |
Reply | Response to a call. The message body is the response union. |
Exception | Failure to make a call. Note: This message type is not used for exceptions that are defined
under the |
Oneway | One-way call that expects no response. |
Instances
Data MessageType Source # | |
Defined in Pinch.Internal.Message Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MessageType -> c MessageType # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c MessageType # toConstr :: MessageType -> Constr # dataTypeOf :: MessageType -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c MessageType) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MessageType) # gmapT :: (forall b. Data b => b -> b) -> MessageType -> MessageType # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MessageType -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MessageType -> r # gmapQ :: (forall d. Data d => d -> u) -> MessageType -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> MessageType -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> MessageType -> m MessageType # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MessageType -> m MessageType # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MessageType -> m MessageType # | |
Generic MessageType Source # | |
Defined in Pinch.Internal.Message Associated Types type Rep MessageType :: Type -> Type # | |
Show MessageType Source # | |
Defined in Pinch.Internal.Message Methods showsPrec :: Int -> MessageType -> ShowS # show :: MessageType -> String # showList :: [MessageType] -> ShowS # | |
NFData MessageType Source # | |
Defined in Pinch.Internal.Message Methods rnf :: MessageType -> () # | |
Eq MessageType Source # | |
Defined in Pinch.Internal.Message | |
type Rep MessageType Source # | |
Defined in Pinch.Internal.Message type Rep MessageType = D1 ('MetaData "MessageType" "Pinch.Internal.Message" "pinch-0.4.3.0-IP3NIMX7ovVBCBsW5ZUwO6" 'False) ((C1 ('MetaCons "Call" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Reply" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Exception" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Oneway" 'PrefixI 'False) (U1 :: Type -> Type))) |