Skip to content

Commit 5a38f2e

Browse files
feat: add network backend abstraction with gvproxy and port reconciliation (B20)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a6c64f7 commit 5a38f2e

5 files changed

Lines changed: 754 additions & 0 deletions

File tree

‎crates/Cargo.lock‎

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎crates/vz-stack/Cargo.toml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,8 @@ thiserror = { workspace = true }
1414
tracing = { workspace = true }
1515
rusqlite = { version = "0.34", features = ["bundled"] }
1616

17+
[dev-dependencies]
18+
tempfile = { workspace = true }
19+
1720
[lints]
1821
workspace = true

‎crates/vz-stack/src/error.rs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,8 @@ pub enum StackError {
1212
/// Invalid stack specification.
1313
#[error("invalid stack spec: {0}")]
1414
InvalidSpec(String),
15+
16+
/// Network backend operation failed.
17+
#[error("network error: {0}")]
18+
Network(String),
1519
}

‎crates/vz-stack/src/lib.rs‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,18 @@
88

99
mod error;
1010
mod events;
11+
mod network;
1112
mod reconcile;
1213
mod spec;
1314
mod state_store;
1415
mod volume;
1516

1617
pub use error::StackError;
1718
pub use events::{EventRecord, StackEvent};
19+
pub use network::{
20+
GvproxyBackend, GvproxyConfig, NetworkBackend, NetworkHandle, PortConflict, PublishedPort,
21+
detect_port_conflicts, locate_gvproxy, ports_changed, resolve_ports,
22+
};
1823
pub use reconcile::{Action, ApplyResult, apply};
1924
pub use spec::{
2025
HealthCheckSpec, MountSpec, NetworkSpec, PortSpec, ResourcesSpec, RestartPolicy, ServiceSpec,

0 commit comments

Comments
 (0)