Sha256: 3b34d45336e614c6d5b89b126d7fd1311bc2e790f49452bcf5e3b6f7fb8d09bf

Contents?: true

Size: 851 Bytes

Versions: 2

Compression:

Stored size: 851 Bytes

Contents

-module(gcd_event).
-include("gcd.hrl").


-export([notify/2, sync_notify/2]).
-export([call/3, call/4]).


notify(Pattern, Message) ->
  [begin
    #service{location=Location} = Service,
    gen_event:notify(Location, Message)
  end ||
  Service <- gcd:match_object(Pattern)].


sync_notify(Pattern, Message) ->
  [begin
    #service{location=Location} = Service,
    gen_event:sync_notify(Location, Message)
  end ||
  Service <- gcd:match_object(Pattern)].


call(Pattern, Handler, Message) ->
  [begin
    #service{location=Location} = Service,
    gen_event:call(Location, Handler, Message)
  end ||
  Service <- gcd:match_object(Pattern)].


call(Pattern, Handler, Message, Timeout) ->
  [begin
    #service{location=Location} = Service,
    gen_event:call(Location, Handler, Message, Timeout)
  end ||
  Service <- gcd:match_object(Pattern)].

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
capricorn-2.0.1 erlang/lib/gcd/src/gcd_event.erl
capricorn-2.0.0 erlang/lib/gcd/src/gcd_event.erl