Skip to content
Hoplite
Theme

Begin typing to search this site.

hoplite.core

Public
(app definition)

Defines one immutable resource application. A map is tagged with :hoplite/type :application; another value becomes the application’s catch-all :handler.

Public
(response definition)
(response status body)

Constructs a logical response value. Response maps may also be returned directly. The one-argument arity tags the definition; the two-argument arity creates a response containing :status and :body.

Experimental
(stream source)

Marks a coroutine or producer as a backpressured response stream by returning {:hoplite/type :stream :source source}.

Experimental
(middleware definition)

Tags a lifecycle middleware definition. The documented lifecycle phases are request, response, error, and close; the complete host integration remains pre-release.

Experimental
(service definition)

Tags a managed application service definition.

Experimental
(module definition)
(adapter definition)
(store definition)

Define composable behaviour entirely in HAL. A module owns behaviour and its contracts; an adapter implements a contract; a store is an adapter expressed through logical atomic operations rather than database tables. SQLite, PGlite and other persistence engines are addon implementations of that store boundary.

Experimental
(package-ref coordinate version export alias config)

Constructs the activation selected by project.edn. For example:

(package-ref "gh:greenways-ai:hoplite"
"0.1.0"
:hoplite/auth
:auth
{:auth/store :auth-store})

The version is exact, the export is package-owned, and the alias is unique in the composed application.

Source: lib/src/hoplite/core.hal