Advertisement
Guest User

Untitled

a guest
Jul 11th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. data PubSubMessage_ = PubSubMessage_ {
  2. from :: Uint8,
  3. content :: Uint8, -- Data field renamed due keyword collision
  4. seqno :: Uint8,
  5. topicIDs :: String,
  6. xxx_unrecognized :: Uint8
  7. } deriving (Show, Eq, Ord, Generic)
  8.  
  9. pubsubUrl :: BaseUrl
  10. pubsubUrl = BaseUrl Http "localhost" 5001 "/api/v0/pubsub"
  11.  
  12. type PubSub = "pub" :> QueryParams "arg" :> QueryParam "encoding" String :> Get '[PlainText] String
  13. type PubSubStream = "sub" :> QueryParams "arg" String :> QueryParam "encoding" String :> StreamGet NewlineFraming JSON (ResultStream PubSubMessage_)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement