package sihl

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file middleware_message.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
open Lwt.Syntax

module Make (MessageService : Message.Service.Sig.SERVICE) = struct
  let m () =
    let filter handler ctx =
      let* result = MessageService.rotate ctx in
      match result with
      | Some message ->
          let ctx = Message.ctx_add message ctx in
          handler ctx
      | None -> handler ctx
    in
    Middleware_core.create ~name:"message" filter
end
OCaml

Innovation. Community. Security.