arachne.pedestal.dsl

User-facing DSL functions for init scripts

create-server

(create-server arachne-id port)
Define an Pedestal HTTP server entity with the given Arachne ID and port, in the current
configuration. Return the tempid of the new server.

interceptor

(interceptor <path> component & opts)
Define a component to be a Pedestal interceptor attached to the specified path.

Arguments are:

- path (optional) - the path to attach the interceptor (defaults to '/' in the current context)
- component (mandatory) - the Arachne component. The runtime instance of the component must satisfy
  Pedestal's IntoInterceptor protocol.
- options (optional) - A map (or kwargs) of additional options.

Currently supported options are:

- priority (optional) - the priority relative to other interceptors defined at the same path. If
  omitted, defaults to the lexical order of the config script

server

macro

(server arachne-id port & body)
Define a Pedestal HTTP server in the current configuration. Evaluates the body with the server
bound as the context server. Returns the eid of the server component.