Copyright | (c) Abhinav Gupta 2015 |
---|---|
License | BSD3 |
Maintainer | Abhinav Gupta <mail@abhinavg.net> |
Stability | experimental |
Safe Haskell | Safe |
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
Eq Message Source # | |
Show Message Source # | |
Generic Message Source # | |
NFData Message Source # | |
Defined in Pinch.Internal.Message | |
type Rep Message Source # | |
Defined in Pinch.Internal.Message type Rep Message = D1 (MetaData "Message" "Pinch.Internal.Message" "pinch-0.3.4.1-6i8lWHA1d5m12B6E7SIAjq" 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
Eq MessageType Source # | |
Defined in Pinch.Internal.Message | |
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 :: (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 # | |
Show MessageType Source # | |
Defined in Pinch.Internal.Message Methods showsPrec :: Int -> MessageType -> ShowS # show :: MessageType -> String # showList :: [MessageType] -> ShowS # | |
Generic MessageType Source # | |
Defined in Pinch.Internal.Message Associated Types type Rep MessageType :: Type -> Type # | |
NFData MessageType Source # | |
Defined in Pinch.Internal.Message Methods rnf :: MessageType -> () # | |
type Rep MessageType Source # | |
Defined in Pinch.Internal.Message type Rep MessageType = D1 (MetaData "MessageType" "Pinch.Internal.Message" "pinch-0.3.4.1-6i8lWHA1d5m12B6E7SIAjq" 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))) |