mirror of
https://seed.radicle.dev/rad:zwTxygwuz5LDGBq255RA2CbNGrz8.git
synced 2026-10-18 19:30:29 +08:00
feat: define an adapter protocol version number constant
This commit is contained in:
@@ -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
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user