Fork me on GitHub
#pedestal
<
2020-11-04
>
simongray11:11:48

I was thinking it could make sense to set my own namespaced key in the service map and allow my interceptors to read configuration from that. Is that advisable? And is it even possible for an interceptor to read keys in the service map?

simongray11:11:10

@U2J4FRT2T Perfect! I guess this does not come built in then. Do you also keep your own custom keys in the service map or do you just this interceptor to read some of the standard keys?

souenzzo11:11:55

I use a lot of custom keys. including things like "db connection" and other things

simongray11:11:23

The point was just to have an alternative to calling a bunch of interceptor constructor functions. Integrating with the Pedestal service map would also gather more configuration in the same place. So for instance I might write:

{::http/type :jetty
 ::http/port 8080
 ::http/routes #{...}
 :my.own.ns/config {...}}