-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP]feat: query config listeners info #134
base: master
Are you sure you want to change the base?
Conversation
@@ -297,14 +300,48 @@ pub enum ListenerResult { | |||
DATA(Vec<ConfigKey>), | |||
} | |||
|
|||
#[derive(Debug, Clone, Serialize, Deserialize)] | |||
#[serde(transparent)] | |||
pub struct AppName(String); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AppName 位置需要改动吗? 需要添加校验规则吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AppName后面注册中心应该也会用,位置可以考虑放在common/model中;
校验规则应该不需要,取值上可以把考虑只取符合规则的值,如果不合规就当做unknow。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的
pagiante: &PaginateQuery, | ||
) -> (usize, Vec<ConfigListenerDo>) { | ||
let ids = self.listener.listener.get(config_key).unwrap(); | ||
let cursors = &ids[pagiante.page_no - 1..pagiante.page_size]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
page_no 的最小值是1
#73