MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / mode

Function mode

atomic-cli/src/service/mod.rs:82–92  ·  view source on GitHub ↗

Resolve the service mode from the environment. See the module docs: local is the default; unknown values route local (no socket probing — an `ATOMIC_SERVICE=auto` refinement is deliberately out of scope).

()

Source from the content-addressed store, hash-verified

80/// local is the default; unknown values route local (no socket probing —
81/// an `ATOMIC_SERVICE=auto` refinement is deliberately out of scope).
82pub fn mode() -> Mode {
83 match std::env::var(ENV_SERVICE).ok().as_deref() {
84 Some("reactor") => return Mode::Reactor,
85 Some("local") => return Mode::Local,
86 _ => {}
87 }
88 match std::env::var(ENV_RPC).ok().as_deref() {
89 Some("1") => Mode::Reactor,
90 _ => Mode::Local,
91 }
92}
93
94/// One backend's live session state.
95enum Backend {

Callers 2

sink_forFunction · 0.85
open_rootMethod · 0.85

Calls 1

okMethod · 0.45

Tested by

no test coverage detected