Skip to content

Commit

Permalink
File: private some apis
Browse files Browse the repository at this point in the history
  • Loading branch information
tyt2y3 committed Jul 6, 2024
1 parent 4a9003f commit 02b98a4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sea-streamer-file/src/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ pub fn is_end_of_stream<M: HasMessageHeader>(mess: &M) -> bool {
}

/// This should never be written on file
pub fn pulse_message() -> OwnedMessage {
pub(crate) fn pulse_message() -> OwnedMessage {
let header = MessageHeader::new(
StreamKey::new(SEA_STREAMER_INTERNAL).unwrap(),
ShardId::new(0),
Expand All @@ -707,15 +707,15 @@ pub fn pulse_message() -> OwnedMessage {
OwnedMessage::new(header, PULSE_MESSAGE.into_bytes())
}

pub fn is_pulse(mess: &SharedMessage) -> bool {
pub(crate) fn is_pulse(mess: &SharedMessage) -> bool {
mess.header().stream_key().name() == SEA_STREAMER_INTERNAL
&& mess.message().as_bytes() == PULSE_MESSAGE.as_bytes()
}

pub fn is_internal(mess: &SharedMessage) -> bool {
pub(crate) fn is_internal(mess: &SharedMessage) -> bool {
mess.header().stream_key().name() == SEA_STREAMER_INTERNAL
}

pub fn is_wildcard(key: &StreamKey) -> bool {
pub(crate) fn is_wildcard(key: &StreamKey) -> bool {
key.name() == SEA_STREAMER_WILDCARD
}

0 comments on commit 02b98a4

Please sign in to comment.