{"repo":"am-kantox/envio","free":true,"listed":false,"github":"https://github.com/am-kantox/envio","clone":"git clone https://github.com/am-kantox/envio.git","description":"Application-wide registry with handy helpers to ease dispatching","language":"Elixir","stars":20,"topics":["elixir","elixir-lang","registry","messaging"],"license":"MIT","category":"chat-messaging","readme_excerpt":"Envío Application-wide registry with handy helpers to ease dispatching. Installation Simply add envio to your list of dependencies in mix.exs : Usage Simple publisher Use Envio.Publisher helper to scaffold the registry publisher. It provides broadcast/2 helper (and brodcast/1 if the default channel is set.) Simple subscriber ( dispatch ) Just register your handler anywhere in the code: Sucker.suck/1 will be called with a payload. PubSub subscriber ( pub sub ) Use Envio.Subscriber helper to scaffold the registry subscriber. Implement handle envio/2 for custom message handling. The default implementation collects last 10 messages in it’s state. Phoenix.PubSub subscriber ( phoenix pub sub ) Use manager: :phoenix pub sub for distributed message broadcasting. The implementation below subscribes to \"main\" channel in the distributed OTP environment and prints out each subsequent incoming message to standard output. The publisher this subscriber might be listening to would look like Changelog - 1.0.0 → Modern Elixir v1.16 update, no more features planned - 0.10.2 → Accept :warning alongside :warn - 0.10.1 → Runtime configs for backends via {:system, value} tuples - 0.10.0 → Process backend - 0.8.0 → Phoenix.PubSub support (+ backend) - 0.5.0 → removed a dependency from Slack package - 0.4.0 → better docs and other enhancements - 0.3.0 → Envio.Backend and infrastructure for backends; Slack as an example. ToDo - Back pressure with GenStage for :dispatch kind of delivery; - Set of back","default_branch":null,"files":null,"tree":[],"storefront":"/r/am-kantox","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/am-kantox/envio/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}