Rename doc server to stdio server
This commit is contained in:
parent
12b077b7be
commit
03cb33ba7b
7 changed files with 8 additions and 8 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
## Build Commands
|
||||
- Build project: `cargo build`
|
||||
- Run STDIN/STDOUT server: `cargo run --bin doc-server`
|
||||
- Run STDIN/STDOUT server: `cargo run --bin stdio-server`
|
||||
- Run HTTP/SSE server: `cargo run --bin axum-docs`
|
||||
- Run tests: `cargo test`
|
||||
- Run specific test: `cargo test test_name`
|
||||
|
|
|
@ -48,8 +48,8 @@ path = "src/bin/cratedocs.rs"
|
|||
|
||||
# Keep existing binaries for backward compatibility
|
||||
[[bin]]
|
||||
name = "doc-server"
|
||||
path = "src/bin/doc_server.rs"
|
||||
name = "stdio-server"
|
||||
path = "src/bin/stdio_server.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "http-sse-server"
|
||||
|
|
|
@ -44,7 +44,7 @@ For backward compatibility, you can still use the original binaries:
|
|||
|
||||
```bash
|
||||
# STDIN/STDOUT Mode
|
||||
cargo run --bin doc-server
|
||||
cargo run --bin stdio-server
|
||||
|
||||
# HTTP/SSE Mode
|
||||
cargo run --bin axum-docs
|
||||
|
|
|
@ -12,7 +12,7 @@ The server consists of several key components:
|
|||
- Implements caching to avoid redundant API requests
|
||||
|
||||
2. **Transport Implementations**:
|
||||
- STDIN/STDOUT server (`src/bin/doc_server.rs`)
|
||||
- STDIN/STDOUT server (`src/bin/stdio_server.rs`)
|
||||
- HTTP/SSE server (`src/bin/axum_docs.rs`)
|
||||
|
||||
3. **Utilities**:
|
||||
|
|
|
@ -6,9 +6,9 @@ use tokio::io::{self, AsyncBufReadExt, AsyncWriteExt, BufReader};
|
|||
|
||||
// Simple example client for interacting with the doc server via stdin/stdout
|
||||
async fn stdio_client() -> Result<()> {
|
||||
// Start the doc-server in a separate process
|
||||
// Start the stdio-server in a separate process
|
||||
let mut child = tokio::process::Command::new("cargo")
|
||||
.args(["run", "--bin", "doc-server"])
|
||||
.args(["run", "--bin", "stdio-server"])
|
||||
.stdin(std::process::Stdio::piped())
|
||||
.stdout(std::process::Stdio::piped())
|
||||
.spawn()?;
|
||||
|
|
|
@ -48,7 +48,7 @@ async fn main() -> Result<()> {
|
|||
|
||||
async fn run_stdio_server(debug: bool) -> Result<()> {
|
||||
// Set up file appender for logging
|
||||
let file_appender = RollingFileAppender::new(Rotation::DAILY, "logs", "doc-server.log");
|
||||
let file_appender = RollingFileAppender::new(Rotation::DAILY, "logs", "stdio-server.log");
|
||||
|
||||
// Initialize the tracing subscriber with file logging
|
||||
let level = if debug { tracing::Level::DEBUG } else { tracing::Level::INFO };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue