(build-inventory-data inventory pattern-sets)
Inputs: [inventory :- shared/Inventory pattern-sets :- shared/PatternSets] Returns: p/InventoryResponse
Build the payload of the inventory response message given the inventory snapshot and a set of patterns to filter the snapshot.
Inputs: [inventory :- shared/Inventory pattern-sets :- shared/PatternSets] Returns: p/InventoryResponse Build the payload of the inventory response message given the inventory snapshot and a set of patterns to filter the snapshot.
(build-pattern-sets patterns)
Inputs: [patterns :- [p/Uri]] Returns: shared/PatternSets
Parse the passed patterns and split them into explicit and wildcard sets for faster matching.
Inputs: [patterns :- [p/Uri]] Returns: shared/PatternSets Parse the passed patterns and split them into explicit and wildcard sets for faster matching.
(build-update-data updates pattern-sets)
Inputs: [updates :- [p/InventoryChange] pattern-sets :- shared/PatternSets] Returns: (s/maybe p/InventoryUpdate)
Build the payload of the inventory update message given the inventory updates snapshot and a set of patterns to filter the snapshot. Return nil if there are no updates matching the patterns.
Inputs: [updates :- [p/InventoryChange] pattern-sets :- shared/PatternSets] Returns: (s/maybe p/InventoryUpdate) Build the payload of the inventory update message given the inventory updates snapshot and a set of patterns to filter the snapshot. Return nil if there are no updates matching the patterns.
(init-database)
Inputs: [] Returns: shared/BrokerDatabase
Inputs: [] Returns: shared/BrokerDatabase
(send-updates broker)
Inputs: [broker :- Broker]
Inputs: [broker :- Broker]
(start-inventory-updates! broker)
Inputs: [broker :- Broker]
Start periodic sending of the inventory updates.
Inputs: [broker :- Broker] Start periodic sending of the inventory updates.
(stop-inventory-updates! broker)
Inputs: [broker :- Broker]
Stop the periodic sending of the inventory updates.
Inputs: [broker :- Broker] Stop the periodic sending of the inventory updates.
(subscribe-client! broker client connection pattern-sets)
Inputs: [broker :- Broker client :- p/Uri connection :- Object pattern-sets :- shared/PatternSets] Returns: shared/BrokerDatabase
Subscribe the specified client for inventory updates. Expects a promise of a connection, to be fulfilled when the initial inventory response has been sent; that prevents messages appearing out of order. Return the broker database snapshot at the time of subscribing.
Inputs: [broker :- Broker client :- p/Uri connection :- Object pattern-sets :- shared/PatternSets] Returns: shared/BrokerDatabase Subscribe the specified client for inventory updates. Expects a promise of a connection, to be fulfilled when the initial inventory response has been sent; that prevents messages appearing out of order. Return the broker database snapshot at the time of subscribing.
(unchecked+ a b)
Inputs: [a :- s/Int b :- s/Int] Returns: s/Int
An addition which can overflow
Inputs: [a :- s/Int b :- s/Int] Returns: s/Int An addition which can overflow
(unchecked- a b)
Inputs: [a :- s/Int b :- s/Int] Returns: s/Int
A substraction which can overflow
Inputs: [a :- s/Int b :- s/Int] Returns: s/Int A substraction which can overflow
(unsubscribe-client! broker client)
Inputs: [broker :- Broker client :- p/Uri] Returns: shared/BrokerDatabase
Unsubscribe the specified client from inventory updates. Return the broker database snapshot at the time of unsubscribing.
Inputs: [broker :- Broker client :- p/Uri] Returns: shared/BrokerDatabase Unsubscribe the specified client from inventory updates. Return the broker database snapshot at the time of unsubscribing.
(uri-pattern-sets-match? {:keys [explicit wildcard]} subject)
Inputs: [{:keys [explicit wildcard]} :- shared/PatternSets subject :- p/Uri] Returns: s/Bool
Does a subject uri match the pattern sets?
Inputs: [{:keys [explicit wildcard]} :- shared/PatternSets subject :- p/Uri] Returns: s/Bool Does a subject uri match the pattern sets?
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close