Skip to content

Instantly share code, notes, and snippets.

@mccraigmccraig
Created March 28, 2017 10:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mccraigmccraig/a46000ac6adc02b2c0f55b64bfb7054b to your computer and use it in GitHub Desktop.
Save mccraigmccraig/a46000ac6adc02b2c0f55b64bfb7054b to your computer and use it in GitHub Desktop.
(def sys-builder
(system-builder
[[:schema-fn-validation? set-schema-fn-validation {}]
[:logging logconfig/configure-timbre
{:opts [:config :logging-config]
:environment [:config :environment]}]
[:cassandra alia-session/create-session [:config :alia-opts]]
[:kafka-producer create-kafka-producer [:config :kafka-producer-opts]]
[:nats-client nats/create-nats-client {:nats-opts [:config :nats-opts]}]
[:elasticsearch create-elasticsearch-client
{:elasticsearch-opts [:config :elasticsearch-opts]}]
[:elasticsearch-async-client create-elasticsearch-async-client
{:elasticsearch-opts [:config :elasticsearch-opts]}]
[:vimeo-client vimeo/create-vimeo-client [:config :vimeo-client-opts]]
[:user-filestore-backend
er-model.connectors.filestore.util/create-backend
{:backend-opts [:config :filestore-opts]}]
[:authenticated-filestore-backend
er-model.connectors.filestore.util/create-admin-backend
{:backend-opts [:config :authenticated-filestore-opts]}]
[:filestore
filestore/create-filestore
{:filestore-opts [:user-filestore-backend]
:vimeo-client [:vimeo-client]}]
[:authenticated-filestore
filestore/create-filestore
{:filestore-opts [:authenticated-filestore-backend]
:vimeo-client [:vimeo-client]}]
[:s3 create-s3-client {:s3-opts [:config :s3-opts]}]
[:slurper create-slurper {:s3 [:s3]}]
[:string-template-renderer
st-renderer/create-string-template-renderer
{:slurper [:slurper]
:string-templates-base-url [:config :string-templates-base-url]}]
[:template-expander texp/create-template-expander
{:string-template-renderer [:string-template-renderer]
:app-url-scheme [:config :app-url-scheme]
:app-universal-login-link [:config :app-universal-login-link]
:web-url [:config :web-url]
:admin-email-address [:config :admin-email-address]}]
[:comms-throttler exm/create-db-throttler {:cassandra [:cassandra]}]
[:mandrillapp create-mandrillapp {:mandrillapp-opts [:config :mandrillapp-opts]}]
[:mailer create-mailer
{:mailer-opts [:config :mailer-opts]
:template-expander [:template-expander]
:mandrillapp [:mandrillapp]}]
[:deliver-sms create-deliver-sms {:deliver-sms-opts [:config :deliver-sms-opts]
:twilio-sms-opts [:config :twilio-sms-opts]}]
[:send-sms ssms/create-send-sms
{:deliver-sms [:deliver-sms]
:template-expander [:template-expander]}]
[:invalid-device-token-handler
um/create-delete-invalid-device-token-handler
{:cassandra [:cassandra]}]
[:pushwoosh create-push {:push-opts [:config :push-opts]
:invalid-device-token-handler [:invalid-device-token-handler]}]
[:routing-bloom-factory
create-str-bloom-factory
[:config :routing-bloom-opts]]]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment