back interdiff of round #1 and #0

slingshot: configurable cache sizes #3

open
opened by nekomimi.pet targeting main from nekomimi.pet/microcosm-rs: main

I noticed defaults were hardcoded

./slingshot --jetstream us-east-1 --cache-dir ./foyer \
    --cache-memory-mb 128 \
    --cache-disk-gb 2
ERROR
slingshot/src/firehose_cache.rs

Failed to calculate interdiff for this file.

ERROR
slingshot/src/main.rs

Failed to calculate interdiff for this file.

NEW
slingshot/src/server.rs
··· 694 694 domain: Option<String>, 695 695 acme_contact: Option<String>, 696 696 certs: Option<PathBuf>, 697 + port: u16, 697 698 shutdown: CancellationToken, 698 699 ) -> Result<(), ServerError> { 699 700 let repo = Arc::new(repo); ··· 752 753 ) 753 754 .await 754 755 } else { 755 - run(TcpListener::bind("127.0.0.1:3000"), app, shutdown).await 756 + run( 757 + TcpListener::bind(format!("127.0.0.1:{port}")), 758 + app, 759 + shutdown, 760 + ) 761 + .await 756 762 } 757 763 } 758 764