MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / new

Method new

crates/opencode-server/src/server.rs:122–132  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

120
121impl ServerState {
122 pub fn new() -> Self {
123 let (tx, _) = broadcast::channel(1024);
124 Self {
125 sessions: Mutex::new(SessionManager::new()),
126 providers: ProviderRegistry::new(),
127 auth_manager: Arc::new(AuthManager::new()),
128 event_bus: tx,
129 session_repo: None,
130 message_repo: None,
131 }
132 }
133
134 pub async fn new_with_storage() -> anyhow::Result<Self> {
135 Self::new_with_storage_for_url(DEFAULT_SERVER_URL.to_string()).await

Callers

nothing calls this directly

Calls 1

newFunction · 0.85

Tested by

no test coverage detected