╭ changed ────╮ │src/event.zig│ ╰─────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────╮ │15 // the branch haxy events are committed to before being consumed │ │16 pub const events_ref: rf.Ref = .{ .kind = .head, .name = "haxy/meta" }; │ │17 │ │18 +// options + db type for *the admin repo* — the single event store that holds│ │19 +// users, repos, issues, etc. the functions below stay parameterized over │ │20 +// repo_opts because they also operate on individual repos in the repos dir, │ │21 +// which may use different options │ │22 +pub const admin_repo_opts: rp.RepoOpts(.xit) = .{}; │ │23 +pub const AdminDB = rp.Repo(.xit, admin_repo_opts).DB; │ │24 + │ │25 pub const EventKind = enum { │ │26 user, │ │27 repo, │ ╰─────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────╮ │348 return try DB.HashMap(.read_only).init(haxy_moment_cursor); │ │349 } │ │350 │ │344 -// commit each event as a JSON message on the events branch, then consume them│ │345 -// into the database │ │351 pub fn commitAndConsume( │ │352 comptime repo_opts: rp.RepoOpts(.xit), │ │353 io: std.Io, │ ╰───────────────────────────────────────────────────────────────────────────────────╯