We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Compared to sentinel-golang, some functions and struct fields have different visibility in sentinel-rust.
For example, form_metric_filename in golang is public but in rust it is private.
// Generate the metric file name from the service name. func FormMetricFileName(serviceName string, withPid bool) string { dot := "." separator := "-" if strings.Contains(serviceName, dot) { serviceName = strings.ReplaceAll(serviceName, dot, separator) } filename := serviceName + separator + MetricFileNameSuffix if withPid { pid := os.Getpid() filename = filename + ".pid" + strconv.Itoa(pid) } return filename }
// Generate the metric file name from the service name. fn form_metric_filename(service_name: &str, with_pid: bool) -> String { let separator = "-"; let mut filename = if service_name.contains('.') { service_name.replace('.', separator) } else { service_name.to_string() }; filename.push_str(&format!("{}{}", separator, METRIC_FILENAME_SUFFIX)); if with_pid { let pid = std::process::id(); filename.push_str(&format!(".pid{}", pid)); } filename }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Compared to sentinel-golang, some functions and struct fields have different visibility in sentinel-rust.
For example, form_metric_filename in golang is public but in rust it is private.
The text was updated successfully, but these errors were encountered: