From 2e980f177f2eb8a2cc766f9079af5db0bfe8605e Mon Sep 17 00:00:00 2001 From: Forsworns <378974295@qq.com> Date: Sat, 21 Aug 2021 22:35:56 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=F0=9F=93=9D=20update=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CODE_OF_CONDUCT.md | 73 ++++++++++++++++++++++++++++++++++++++++++ CONTRIBUTING.md | 80 ++++++++++++++++++++++++++++++++++++++++++++++ README.md | 59 ++++++++++++++++++++++++++-------- 3 files changed, 198 insertions(+), 14 deletions(-) create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..c0a3348 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,73 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +education, socio-economic status, nationality, personal appearance, race, +religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at sentinel@linux.alibaba.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.html](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html) + +[homepage]: https://www.contributor-covenant.org \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..b92bd5c --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,80 @@ +# Contributing to Sentinel + +Welcome to Sentinel! This document is a guideline about how to contribute to Sentinel. +If you find something incorrect or missing, please leave comments / suggestions. + +## Before you get started + +### Code of Conduct + +Please make sure to read and observe our [Code of Conduct](./CODE_OF_CONDUCT.md). + +### Setting up your development environment + +Currently, the implementation and tests are conducted under `rustc 1.53.0`, but lower versions should work. + +## Contributing + +We are always very happy to have contributions, whether for typo fix, bug fix or big new features. +Please do not ever hesitate to ask a question or send a pull request. + +We strongly value documentation and integration with other projects. +We are very glad to accept improvements for these aspects. + +### GitHub workflow + +We use the `master` branch as the development branch, which indicates that this is a unstable branch. + +Here are the workflow for contributors: + +1. Fork to your own +2. Clone fork to local repository +3. Create a new branch and work on it +4. Keep your branch in sync +5. Commit your changes (make sure your commit message concise) +6. Push your commits to your forked repository +7. Create a pull request + +Please follow [the pull request template](./.github/PULL_REQUEST_TEMPLATE.md). +Please make sure the PR has a corresponding issue. + +After creating a PR, one or more reviewers will be assigned to the pull request. +The reviewers will review the code. + +Before merging a PR, squash any fix review feedback, typo, merged, and rebased sorts of commits. +The final commit message should be clear and concise. + +### Open an issue / PR + +We use [GitHub Issues](https://github.com/alibaba/Sentinel/issues) and [Pull Requests](https://github.com/alibaba/Sentinel/pulls) for trackers. + +If you find a typo in document, find a bug in code, or want new features, or want to give suggestions, +you can [open an issue on GitHub](https://github.com/alibaba/Sentinel/issues/new) to report it. +Please follow the guideline message in the issue template. + +If you want to contribute, please follow the [contribution workflow](#github-workflow) and create a new pull request. +If your PR contains large changes, e.g. component refactor or new components, please write detailed documents +about its design and usage. + +Note that a single PR should not be too large. If heavy changes are required, it's better to separate the changes +to a few individual PRs. + +### Code review + +All code should be well reviewed by one or more committers. Some principles: + +- Readability: Important code should be well-documented. Comply with our code style. +- Elegance: New functions, classes or components should be well designed. +- Testability: Important code should be well-tested (high unit test coverage). + +## Community + +### Contact us + +#### Mailing list + +If you have any questions or advice, please contact sentinel@linux.alibaba.com. + +#### Gitter + +Our Gitter room: [https://gitter.im/alibaba/Sentinel](https://gitter.im/alibaba/Sentinel). \ No newline at end of file diff --git a/README.md b/README.md index 4a18471..6f764cf 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,54 @@ -# sentinel-rust -Sentinel Rust version +Sentinel Logo +# Sentinel: The Sentinel of Your Microservices (WIP) -## Document +[![Crates.io][crates-badge]][crates-url] +[![Sentinel CI][ci-badge]][ci-url] +[![Apache licensed][apache-badge]][apache-url] +[![Gitter chat][gitter-badge]][gitter-url] -``` -make doc -``` -## Tests +[crates-badge]: https://img.shields.io/crates/v/sentinel-rs.svg +[crates-url]: https://crates.io/crates/sentinel-rs +[ci-badge]: https://github.com/sentinel-group/sentinel-rust/actions/workflows/ci.yml/badge.svg +[ci-url]: https://github.com/sentinel-group/sentinel-rust/actions/workflows/ci.yml +[apache-badge]: https://img.shields.io/badge/license-Apache%202-4EB1BA.svg +[apache-url]: https://www.apache.org/licenses/LICENSE-2.0.html +[gitter-badge]: https://badges.gitter.im/alibaba/Sentinel.svg +[gitter-url]: https://gitter.im/alibaba/Sentinel -### Unit Test +## Introduction -``` -make unit -``` +As distributed systems become increasingly popular, the reliability between services is becoming more important than ever before. +Sentinel takes "flow" as breakthrough point, and works on multiple fields including **flow control**, +**traffic shaping**, **circuit breaking** and **system adaptive protection**, to guarantee reliability and resilience for microservices. + +Sentinel has the following features: + +- **Rich applicable scenarios**: Sentinel has been wildly used in Alibaba, and has covered almost all the core-scenarios in Double-11 (11.11) Shopping Festivals in the past 10 years, such as “Second Kill” which needs to limit burst flow traffic to meet the system capacity, message peak clipping and valley fills, circuit breaking for unreliable downstream services, cluster flow control, etc. +- **Real-time monitoring**: Sentinel also provides real-time monitoring ability. You can see the runtime information of a single machine in real-time, and pump the metrics to outside metric components like Prometheus. +- **Polyglot support**: Sentinel has provided native support for [Rust](https://github.com/sentinel-group/sentinel-rust), [Java](https://github.com/alibaba/Sentinel), [Go](https://github.com/alibaba/sentinel-golang) and [C++](https://github.com/alibaba/sentinel-cpp). + + +## Documentation -### Tests on api +See the [Sentinel](https://sentinelguard.io/en-us/) for the document website. +See the [中文文档](https://sentinelguard.io/zh-cn/) for document in Chinese. + +See the [Wiki](https://github.com/alibaba/Sentinel/wiki) for full documentation, examples, blog posts, operational details and other information. + +The [Rust API documentation](https://docs.rs/sentinel-rs/latest) is working in progress. + +## Example + +Add the dependency in Cargo.toml: + +```toml +[dependencies] +sentinel-rs = { version = "0.1.0", features = ["full"] } ``` -make api -``` \ No newline at end of file + +## Contributing + +Contributions are always welcomed! Please refer to [CONTRIBUTING](./CONTRIBUTING.md) for detailed guidelines. \ No newline at end of file