package krb

  1. Overview
  2. Docs
A library for using Kerberos for both Rpc and Tcp communication

Install

Dune Dependency

Authors

Maintainers

Sources

krb-v0.16.0.tar.gz
sha256=353675621e4c5a888f2483dc1bb7281bd17ce4ed7dfd2f40142257f98db7c77d

doc/src/krb.internal/cursor.ml.html

Source file cursor.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
open Core
open Async

module type Arg = Cursor_intf.Arg

module Make (S : Arg) = struct
  let get_all container =
    let tag_arguments = lazy (S.Container.tag container) in
    let container_raw = S.Container.to_raw container in
    let info = Krb_info.create ~tag_arguments S.info in
    Context_sequencer.enqueue_job_with_info ~info ~f:(fun c ->
      let open Result.Let_syntax in
      let%bind cursor = S.Cursor.start c container_raw in
      let rec gather acc =
        match%bind S.Cursor.advance c container_raw cursor with
        | Some item ->
          Context_sequencer.add_finalizer item ~f:S.Item.free;
          gather (item :: acc)
        | None -> return (List.rev acc)
      in
      let result = gather [] in
      let%bind () = S.Cursor.finish c container_raw cursor in
      result)
    >>=? Deferred.Or_error.List.map ~how:`Sequential ~f:S.Item.of_raw
  ;;
end
OCaml

Innovation. Community. Security.