Ok, excellent! So then, when constructing the system-map for prod it would 
look something like this:

(defn new-system [config-options]
  (let [{:keys [store-create-fn]} config-options]
    (component/system-map
      :store (new-store store-create-fn)
      ...
      )))
      
(new-system {:store-create-fn create-riak-store})

And for tests it would be:

(defn new-system [config-options]
  (let [{:keys [store-create-fn]} config-options]
    (component/system-map
      :store (new-store store-create-fn)
      ...
      )))
      
(new-system {:store-create-fn create-memory-store})

Does that make sense?

On Tuesday, 16 September 2014 09:19:09 UTC+1, Michael Klishin wrote:
>
> On 16 September 2014 at 12:13:13, Anvar Karimson (an...@karimson.com 
> <javascript:>) wrote: 
> > Option 1, separate lifecycle from the actual store: 
>
> I've seen this approach in use, it works well.  
> --   
> @michaelklishin, github.com/michaelklishin 
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to