Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

curvelogic/octobind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

octobind

An elementary multibind facility for com.stuartsierra.component.

Usage

Occasionally it is useful to be able to acquire a collection of dependencies rather than individual dependencies.

(defrecord Contribution [listeners])
(def mod1 (Contribution. [notify-updates send-log])
(def mod2 (Contribution. [track-logins])
(def mod3 (Contribution. [roll-buffer])

(defrecord Eventer [contribs listeners]
  component/Lifecycle
  (start [self]
    (assoc self :listeners (mapcat :listeners (contribs))))
  (stop [self] self))

(component/system-map
  :eventer (component/using (eventer) [:contribs])
  :contribs (multi/bind mod1 mod2 mod3)

License

Copyright © 2015 FIXME

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

About

Simple multibind helper for stuartsierra.component.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published