Skip to main content

Module external_vcs_adapter

Module external_vcs_adapter 

Source
Expand description

External VCS adapter — SourceAdapter implementation over JSON-over-stdio.

Wraps an external VCS plugin process and implements the SourceAdapter trait by translating every method call into a single JSON-over-stdio request/response exchange.

§Lifecycle

For each method call, ExternalVcsAdapter:

  1. Spawns the plugin process (fresh per call — plugins are stateless).
  2. Sends a VcsPluginRequest JSON line to the process’s stdin.
  3. Reads the VcsPluginResponse JSON line from stdout.
  4. Waits for the process to exit.
  5. Returns the parsed result or a SubmitError on failure.

§Handshake

The first call in ExternalVcsAdapter::new() performs a handshake to validate protocol compatibility. An incompatible protocol version causes construction to fail with SubmitError::ConfigError.

Structs§

ExternalVcsAdapter
SourceAdapter that delegates all operations to an external plugin process.