amqp-worker-0.3.2

Safe HaskellNone
LanguageHaskell2010

Network.AMQP.Worker.Key

Synopsis

Documentation

newtype Key a msg Source #

Keys describe routing and binding info for a message

Constructors

Key [a] 
Instances
Eq a => Eq (Key a msg) Source # 
Instance details

Defined in Network.AMQP.Worker.Key

Methods

(==) :: Key a msg -> Key a msg -> Bool #

(/=) :: Key a msg -> Key a msg -> Bool #

Show a => Show (Key a msg) Source # 
Instance details

Defined in Network.AMQP.Worker.Key

Methods

showsPrec :: Int -> Key a msg -> ShowS #

show :: Key a msg -> String #

showList :: [Key a msg] -> ShowS #

Semigroup (Key a msg) Source # 
Instance details

Defined in Network.AMQP.Worker.Key

Methods

(<>) :: Key a msg -> Key a msg -> Key a msg #

sconcat :: NonEmpty (Key a msg) -> Key a msg #

stimes :: Integral b => b -> Key a msg -> Key a msg #

Monoid (Key a msg) Source # 
Instance details

Defined in Network.AMQP.Worker.Key

Methods

mempty :: Key a msg #

mappend :: Key a msg -> Key a msg -> Key a msg #

mconcat :: [Key a msg] -> Key a msg #

data Binding Source #

A dynamic binding address for topic queues

commentsKey :: Key Binding Comment
commentsKey = key "posts" & star & word "comments" & hash

Constructors

Word BindingWord 
Star 
Hash 
Instances
Eq Binding Source # 
Instance details

Defined in Network.AMQP.Worker.Key

Methods

(==) :: Binding -> Binding -> Bool #

(/=) :: Binding -> Binding -> Bool #

Show Binding Source # 
Instance details

Defined in Network.AMQP.Worker.Key

KeySegment Binding Source # 
Instance details

Defined in Network.AMQP.Worker.Key

data Routing Source #

Every message is sent with a specific routing key

newCommentKey :: Key Routing Comment
newCommentKey = key "posts" & word "1" & word "comments" & word "new"
Instances
Eq Routing Source # 
Instance details

Defined in Network.AMQP.Worker.Key

Methods

(==) :: Routing -> Routing -> Bool #

(/=) :: Routing -> Routing -> Bool #

Show Routing Source # 
Instance details

Defined in Network.AMQP.Worker.Key

KeySegment Routing Source # 
Instance details

Defined in Network.AMQP.Worker.Key

key :: Text -> Key Routing msg Source #

Create a new key

word :: KeySegment a => Text -> Key a msg -> Key a msg Source #

Match a specific word

star :: KeySegment a => Key a msg -> Key Binding msg Source #

Match any one word

hash :: KeySegment a => Key a msg -> Key Binding msg Source #

Match any words

keyText :: KeySegment a => Key a msg -> Text Source #

bindingKey :: KeySegment a => Key a msg -> Key Binding msg Source #

Convert any key to a binding key