File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -350,7 +350,7 @@ fn create_upyun_operator(config: &CloudConfig) -> Result<Operator> {
350350/// use keyring_cli::cloud::{config::CloudConfig, provider::test_connection};
351351///
352352/// # async fn test() -> anyhow::Result<()> {
353- /// let config = CloudConfig { /* ... */ } ;
353+ /// let config = CloudConfig::default() ;
354354/// test_connection(&config).await?;
355355/// # Ok(())
356356/// # }
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ pub struct SshExecOutput {
6666/// # Example
6767///
6868/// ```no_run
69- /// use keyring_cli::mcp::executors::ssh ::SshExecutor;
69+ /// use keyring_cli::mcp::executors::ssh_executor ::SshExecutor;
7070///
7171/// fn main() -> Result<(), Box<dyn std::error::Error>> {
7272/// let private_key = std::fs::read("/path/to/private/key")?;
Original file line number Diff line number Diff line change @@ -39,14 +39,16 @@ pub fn lock_file_path() -> PathBuf {
3939/// ```no_run
4040/// use keyring_cli::mcp::lock::McpLock;
4141///
42+ /// # fn try_main() -> Result<(), Box<dyn std::error::Error>> {
4243/// // Acquire lock (will fail if another instance is running)
4344/// let lock = McpLock::acquire()?;
4445///
4546/// // ... do work ...
4647///
4748/// // Explicitly release (optional, happens automatically on drop)
4849/// lock.release()?;
49- /// # Ok::<(), keyring_cli::Error>(())
50+ /// # Ok(())
51+ /// # }
5052/// ```
5153pub struct McpLock {
5254 file : Option < File > ,
Original file line number Diff line number Diff line change @@ -51,19 +51,18 @@ impl From<McpError> for Error {
5151///
5252/// ```no_run
5353/// use keyring_cli::mcp::server::McpServer;
54+ /// use keyring_cli::mcp::config::McpConfig;
5455/// use std::sync::Arc;
5556///
56- /// #[tokio::main]
57- /// async fn main() -> Result<(), Box<dyn std::error::Error>> {
58- /// let server = McpServer::new(
59- /// Arc::new(Default::default()),
60- /// Arc::new(Default::default()),
61- /// Default::default(),
62- /// );
63- ///
64- /// server.run_stdio().await?;
65- /// Ok(())
66- /// }
57+ /// # async fn example() -> Result<(), Box<dyn std::error::Error>> {
58+ /// // The McpServer requires a Database, McpKeyCache, and McpConfig.
59+ /// // These are typically created from the application's main setup.
60+ /// // See the CLI entry point for a complete example.
61+ /// let config = McpConfig::default();
62+ /// // let server = McpServer::new(db, key_cache, config);
63+ /// // server.run_stdio().await?;
64+ /// # Ok(())
65+ /// # }
6766/// ```
6867pub struct McpServer {
6968 /// Database instance for accessing stored credentials
You can’t perform that action at this time.
0 commit comments