# eb-local.cvmfs ::::{zig:module} eb-local.cvmfs :file: src/cvmfs.zig :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig CernVM-FS checks for `eb-local doctor --cvmfs`. A build does not call any of this, and it sets no client variable. :::: ## Types ::::{zig:type} eb-local.cvmfs.Repo :signature: pub const Repo = struct :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L13 The repository path doctor stats, and the name `cvmfs_config probe` takes. :::{zig:field} eb-local.cvmfs.Repo.path :signature: path: []const u8 :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L14 ::: :::{zig:field} eb-local.cvmfs.Repo.name :signature: name: []const u8 :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L15 ::: :::: ::::{zig:type} eb-local.cvmfs.Mount :signature: pub const Mount = enum :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L19 What a stat of the repository mount means. :::{zig:field} eb-local.cvmfs.Mount.ok :signature: ok :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L19 ::: :::{zig:field} eb-local.cvmfs.Mount.enotconn :signature: enotconn :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L19 ::: :::{zig:field} eb-local.cvmfs.Mount.eio :signature: eio :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L19 ::: :::{zig:field} eb-local.cvmfs.Mount.absent :signature: absent :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L19 ::: :::: ::::{zig:type} eb-local.cvmfs.ProxyMode :signature: pub const ProxyMode = enum :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L22 Whether the client uses a proxy, talks directly, or has no setting. :::{zig:field} eb-local.cvmfs.ProxyMode.unset :signature: unset :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L22 ::: :::{zig:field} eb-local.cvmfs.ProxyMode.direct :signature: direct :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L22 ::: :::{zig:field} eb-local.cvmfs.ProxyMode.proxy :signature: proxy :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L22 ::: :::: ::::{zig:type} eb-local.cvmfs.Proxy :signature: pub const Proxy = struct :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L25 The HTTP proxy the client would use, and the file or variable it came from. :::{zig:field} eb-local.cvmfs.Proxy.mode :signature: mode: ProxyMode = .unset :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L26 ::: :::{zig:field} eb-local.cvmfs.Proxy.value :signature: value: []const u8 = "" :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L27 ::: :::{zig:field} eb-local.cvmfs.Proxy.from :signature: from: []const u8 = "" :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L28 ::: :::{zig:field} eb-local.cvmfs.Proxy.host_injected :signature: host_injected: bool = false :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L30 True when `CVMFS_HTTP_PROXY` in the process environment won over the files. ::: :::: ::::{zig:type} eb-local.cvmfs.Tool :signature: pub const Tool = struct :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L34 One run of `cvmfs_config` or `srun`. :::{zig:field} eb-local.cvmfs.Tool.present :signature: present: bool = false :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L35 ::: :::{zig:field} eb-local.cvmfs.Tool.code :signature: code: u32 = 0 :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L36 ::: :::{zig:field} eb-local.cvmfs.Tool.timed_out :signature: timed_out: bool = false :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L37 ::: :::: ::::{zig:type} eb-local.cvmfs.ParallelKind :signature: pub const ParallelKind = enum :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L41 Why a parallel metadata read ran, or why it did not. :::{zig:field} eb-local.cvmfs.ParallelKind.off :signature: off :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L41 ::: :::{zig:field} eb-local.cvmfs.ParallelKind.stale :signature: stale :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L41 ::: :::{zig:field} eb-local.cvmfs.ParallelKind.outside :signature: outside :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L41 ::: :::{zig:field} eb-local.cvmfs.ParallelKind.srun_ok :signature: srun_ok :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L41 ::: :::{zig:field} eb-local.cvmfs.ParallelKind.srun_fail :signature: srun_fail :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L41 ::: :::{zig:field} eb-local.cvmfs.ParallelKind.srun_timeout :signature: srun_timeout :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L41 ::: :::{zig:field} eb-local.cvmfs.ParallelKind.fork_ok :signature: fork_ok :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L41 ::: :::{zig:field} eb-local.cvmfs.ParallelKind.fork_fail :signature: fork_fail :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L41 ::: :::: ::::{zig:type} eb-local.cvmfs.Parallel :signature: pub const Parallel = struct :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L44 A parallel metadata read, or why it did not run. :::{zig:field} eb-local.cvmfs.Parallel.kind :signature: kind: ParallelKind = .off :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L45 ::: :::{zig:field} eb-local.cvmfs.Parallel.tasks :signature: tasks: u8 = 0 :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L46 ::: :::{zig:field} eb-local.cvmfs.Parallel.code :signature: code: u32 = 0 :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L47 ::: :::: ## Functions :::{zig:function} eb-local.cvmfs.repository :signature: pub fn repository(env: *const std.process.Environ.Map) Repo :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L51 `EESSI_CVMFS_REPO` when it is absolute, otherwise the public EESSI repository. ::: :::{zig:function} eb-local.cvmfs.mountState :signature: pub fn mountState(path: []const u8, forced: ?[]const u8) Mount :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L63 `forced` is a test seam: `ENOTCONN`, `EIO`, `ABSENT` or `OK`. Otherwise stat `path`. ::: :::{zig:function} eb-local.cvmfs.readProxy :signature: pub fn readProxy(a: Allocator, env: *const std.process.Environ.Map, config_root: []const u8, repo_name: []const u8) Allocator.Error!Proxy :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L89 The effective `CVMFS_HTTP_PROXY`. A non-empty environment value wins. Otherwise the last assignment in the client files wins, from `default.conf` through `config.d/.local`. `DIRECT` is direct mode. ::: :::{zig:function} eb-local.cvmfs.runTool :signature: pub fn runTool(a: Allocator, exe: ?[]const u8, argv: []const []const u8, envp: proc.Envp) Tool :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L166 Run `argv[0]`, already an absolute path. A missing program is `present = false`. ::: :::{zig:function} eb-local.cvmfs.parallelProbe :signature: pub fn parallelProbe(a: Allocator, repo: []const u8, tasks: u8, in_job: bool, stale: bool, srun: ?[]const u8, envp: proc.Envp) Parallel :source: https://github.com/stackhands/eb-local/blob/629c1ef39cdece5bfa2145cc8e2e89ae7583d197/src/cvmfs.zig#L184 Read repository metadata from `tasks` processes. `srun`, when its path is set, runs `srun -n N stat `. Otherwise this process forks. A stale mount and a shell outside an allocation are not probed. :::