-
Notifications
You must be signed in to change notification settings - Fork 725
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
*: bit field operator kind. #875
Conversation
server/schedule/operator_kind.go
Outdated
return strings.Join(flagNames, "+") | ||
} | ||
|
||
// ParseOperatorKind converts string (flag name list concat by '+') to OperatorKind. |
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.
I prefer using , or |
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.
LGTM
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.
LGTM
server/schedule/operator_kind.go
Outdated
) | ||
|
||
// OperatorKind is a bit field to identify operator types. | ||
type OperatorKind int |
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.
uint may be better?
/run-all-tests |
/rebuild |
/run-integration-common-test |
The motivation is that an operator can have more than 1 properties, for instance, both moves a peer and transfers a leader, or both initiated by admin and moves a peer.