-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add hot tag taggers SET * Adapt endpoint for client requirements * Refactor and add endpoint to retrive tag taggers
- Loading branch information
Showing
15 changed files
with
397 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
use super::stream::Taggers; | ||
use crate::{models::user::UserStreamType, RedisOps}; | ||
use std::error::Error; | ||
|
||
pub struct TagGlobal {} | ||
|
||
impl TagGlobal { | ||
pub async fn get_tag_taggers( | ||
label: String, | ||
reach: Option<UserStreamType>, | ||
) -> Result<Option<Vec<String>>, Box<dyn std::error::Error + Send + Sync>> { | ||
match reach { | ||
None => read_from_set(&label).await, | ||
_ => Ok(None), | ||
} | ||
} | ||
} | ||
|
||
pub async fn read_from_set( | ||
label: &str, | ||
) -> Result<Option<Vec<String>>, Box<dyn Error + Send + Sync>> { | ||
Taggers::try_from_index_set(&[label], None, None).await | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.