Skip to content

Commit

Permalink
Update review/publish handshake version (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
kimhanbeom authored Jan 25, 2024
1 parent 00b7d7d commit 8e5577b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ file is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and
this project adheres to [Semantic
Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Changed

- Changed `REVIEW_PROTOCOL_VERSION` to "0.27.0"
- Changed `PUBLISH_PROTOCOL_VERSION` to "0.17.0"

## [0.3.1] - 2023-11-07

### Added
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Crusher generates statistics from raw events.

## Requirements

* REview 0.25.0 or higher
* Giganto 0.15.0 or higher
* REview 0.33.0 or higher
* Giganto 0.17.0 or higher

## Usage

Expand Down
2 changes: 1 addition & 1 deletion src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub fn config(certs: Vec<Certificate>, key: PrivateKey, files: Vec<Vec<u8>>) ->
.into_iter()
.map(rustls::Certificate)
.collect();
if let Some(cert) = root_cert.get(0) {
if let Some(cert) = root_cert.first() {
root_store.add(cert)?;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use tokio::{
};
use tracing::{error, info, trace, warn};

const REVIEW_PROTOCOL_VERSION: &str = "0.25.0";
const REVIEW_PROTOCOL_VERSION: &str = "0.27.0";

#[derive(Debug, Deserialize, Clone)]
pub struct RequestedPolicy {
Expand Down
4 changes: 2 additions & 2 deletions src/subscribe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ use tokio::{
use tracing::{error, info, trace, warn};

const INGEST_PROTOCOL_VERSION: &str = "0.15.0";
const PUBLISH_PROTOCOL_VERSION: &str = "0.15.0";
const PUBLISH_PROTOCOL_VERSION: &str = "0.17.0";
const TIME_SERIES_CHANNEL_SIZE: usize = 1;
const LAST_TIME_SERIES_TIMESTAMP_CHANNEL_SIZE: usize = 1;
const SECOND_TO_NANO: i64 = 1_000_000_000;
Expand Down Expand Up @@ -481,7 +481,7 @@ async fn publish_connect(
async fn calculate_series_start_time(req_pol: &RequestedPolicy) -> Result<i64> {
let mut start: i64 = 0;
if let Some(last_time) = LAST_TRANSFER_TIME.read().await.get(&req_pol.id.to_string()) {
let Some(period) = u32::from(Period::try_from(req_pol.period.clone())?).to_i64() else {
let Some(period) = u32::from(Period::from(req_pol.period.clone())).to_i64() else {
bail!("Failed to convert period");
};
let Some(period_nano) = period.checked_mul(SECOND_TO_NANO) else {
Expand Down

0 comments on commit 8e5577b

Please sign in to comment.