MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / make_session

Function make_session

crates/openshell-server/src/ssh_sessions.rs:81–95  ·  view source on GitHub ↗
(id: &str, sandbox_id: &str, expires_at_ms: i64, revoked: bool)

Source from the content-addressed store, hash-verified

79 }
80
81 fn make_session(id: &str, sandbox_id: &str, expires_at_ms: i64, revoked: bool) -> SshSession {
82 SshSession {
83 metadata: Some(openshell_core::proto::datamodel::v1::ObjectMeta {
84 id: id.to_string(),
85 name: format!("session-{id}"),
86 created_at_ms: 1000,
87 labels: HashMap::new(),
88 resource_version: 0,
89 }),
90 sandbox_id: sandbox_id.to_string(),
91 token: id.to_string(),
92 expires_at_ms,
93 revoked,
94 }
95 }
96
97 #[tokio::test]
98 async fn reaper_deletes_expired_sessions() {

Calls

no outgoing calls

Tested by

no test coverage detected