Skip to content

Commit

Permalink
feat: expose types via feature for fluvio protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
EstebanBorai committed Jul 25, 2023
1 parent a2140e9 commit ae33a22
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions crates/fluvio-protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ record = [
"once_cell",
"fluvio-types"
]
types = ["fluvio-types"]
link = ["api","record","thiserror","flv-util","semver","eyre"]
fixture = ["record","derive_builder"]
compress = ["fluvio-compression/compress"]
Expand Down
2 changes: 0 additions & 2 deletions crates/fluvio-protocol/src/core/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ mod encoder;
mod varint;
mod zerocopy;

pub use fluvio_types::Timestamp;

pub use self::bytebuf::ByteBuf;
pub use self::decoder::Decoder;
pub use self::decoder::DecoderVarInt;
Expand Down
5 changes: 5 additions & 0 deletions crates/fluvio-protocol/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ pub mod codec;
#[cfg(feature = "record")]
pub mod record;

#[cfg(feature = "types")]
pub mod types {
pub use fluvio_types::*;
}

#[cfg(feature = "link")]
pub mod link;

Expand Down
2 changes: 1 addition & 1 deletion crates/fluvio-smartmodule/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ eyre = { version = ">=0.6.8", default-features = false, features = [
"auto-install",
] }
fluvio-smartmodule-derive = { version = "0.6.1", path = "../fluvio-smartmodule-derive" }
fluvio-protocol = { workspace = true, features = [ "link"] }
fluvio-protocol = { workspace = true, features = ["link", "types"] }

[dev-dependencies]
criterion = { workspace = true }
Expand Down
5 changes: 3 additions & 2 deletions crates/fluvio-smartmodule/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ use std::io::Cursor;
use std::time::Duration;
use std::{collections::BTreeMap, fmt::Display};
use std::fmt;
use fluvio_protocol::record::{Offset, Record};
use fluvio_protocol::{Decoder, Encoder, Version};
use fluvio_protocol::record::{Offset, Record};
use fluvio_protocol::types::Timestamp;

use crate::{SmartModuleRecord, Timestamp};
use crate::SmartModuleRecord;

/// SmartModule Version with support for Lookback with Age and Timestamps,
/// LTA is the acronym for Lookback, Timestamps, and Age.
Expand Down
2 changes: 1 addition & 1 deletion crates/fluvio-smartmodule/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ mod error;

use std::ops::{Deref, DerefMut};

use fluvio_protocol::core::Timestamp;
use fluvio_protocol::types::Timestamp;

pub use fluvio_smartmodule_derive::{smartmodule, SmartOpt};

Expand Down

0 comments on commit ae33a22

Please sign in to comment.