feat: define an adapter protocol version number constant

This commit is contained in:
Lars Wirzenius
2026-09-08 14:09:59 +03:00
parent 8ac2f7728d
commit de51e04590
2 changed files with 6 additions and 5 deletions
+5
View File
@@ -31,6 +31,11 @@ use crate::copy_tree::{CopyTreeError, copy_tree};
mod copy_tree;
/// Version of the broker/adapter protocol used.
/// This gets put into every [`Request`] message so the adapter can
/// detect its getting a message it knows how to handle.
pub const PROTOCOL_VERSION: usize = 1;
/// The type of a run identifier. For maximum generality, this is a
/// string rather than an integer.
///
+1 -5
View File
@@ -31,7 +31,7 @@ pub use radicle::{
};
pub use radicle_surf::Commit;
pub use radicle_ci_adapter::{Patch, Request, Response, RunId, RunResult};
pub use radicle_ci_adapter::{PROTOCOL_VERSION, Patch, Request, Response, RunId, RunResult};
use crate::{
ci_event::{CiEvent, CiEventV1},
@@ -39,10 +39,6 @@ use crate::{
logger,
};
// This gets put into every [`Request`] message so the adapter can
// detect its getting a message it knows how to handle.
const PROTOCOL_VERSION: usize = 1;
/// Build a [`Request`].
#[derive(Debug, Default)]
pub struct RequestBuilder<'a> {