Skip to content

queer/singyeong-client-elixir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

singyeong-client

A pure Elixir client for 신경.

Installation

Get it on Hex.

def deps do
  [
    {:singyeong, "~> 0.1.1"}
  ]
end

Usage

  1. Add children to your application's supervisor:
    # The actual client that connects and sends/receives messages
    {Singyeong.Client, Singyeong.parse_dsn("singyeong://my_app_name:my_password@localhost:4567")},
    # Event producer
    Singyeong.Producer,
    # Your event consumer
    MyApp.Consumer,
  2. Create a consumer:
    defmodule MyApp.Consumer do
      use Singyeong.Consumer
    
      def start_link do
        Consumer.start_link __MODULE__
      end
    
      def handle_event(event) do
        IO.inspect event, pretty: true
        :ok
      end
    end
  3. That's it! Start running your application whenever you want.

About

Elixir client for 신경

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages