diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml index 8bb8ca6b..2b1d5bee 100644 --- a/.github/workflows/coverity.yml +++ b/.github/workflows/coverity.yml @@ -2,7 +2,7 @@ name: Coverity on: push: branches: - - master + - main jobs: test: @@ -44,7 +44,7 @@ jobs: --form token=${TOKEN} \ --form email=free@ekanayaka.io \ --form file=@raft.tgz \ - --form version=master \ + --form version=main \ --form description="${GITHUB_SHA}" \ https://scan.coverity.com/builds?project=cowsql/raft env: diff --git a/README.md b/README.md index 2edae84c..15ccba9a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![CI Tests](https://github.com/cowsql/raft/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/cowsql/raft/actions/workflows/build-and-test.yml) [![codecov](https://codecov.io/gh/cowsql/raft/branch/master/graph/badge.svg)](https://codecov.io/gh/cowsql/raft) [![Documentation Status](https://readthedocs.org/projects/raft/badge/?version=latest)](https://raft.readthedocs.io/en/latest/?badge=latest) [![Coverity](https://scan.coverity.com/projects/28929/badge.svg)](https://scan.coverity.com/projects/cowsql-raft) +[![CI Tests](https://github.com/cowsql/raft/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/cowsql/raft/actions/workflows/build-and-test.yml) [![codecov](https://codecov.io/gh/cowsql/raft/branch/main/graph/badge.svg)](https://codecov.io/gh/cowsql/raft) [![Documentation Status](https://readthedocs.org/projects/raft/badge/?version=latest)](https://raft.readthedocs.io/en/latest/?badge=latest) [![Coverity](https://scan.coverity.com/projects/28929/badge.svg)](https://scan.coverity.com/projects/cowsql-raft) [English](./README.md)|[简体中文](./README_CH.md) @@ -16,7 +16,7 @@ requires Linux, since it uses the Linux [AIO](http://man7.org/linux/man-pages/man2/io_submit.2.html) API for disk I/O. Patches are welcome to add support for more platforms. -See [raft.h](https://github.com/cowsql/raft/blob/master/include/raft.h) for full documentation. +See [raft.h](./include/raft.h) for full documentation. Fork of Canonical's raft library -------------------------------- @@ -83,8 +83,7 @@ Example ------- The best way to understand how to use the library is probably reading the code -of the [example server](https://github.com/cowsql/raft/blob/master/example/server.c) -included in the source code. +of the [example server](./example/server.c) included in the source code. You can also see the example server in action by running: @@ -98,10 +97,9 @@ stops and restarts a server from time to time. Quick guide ----------- -It is recommended that you read -[raft.h](https://github.com/cowsql/raft/blob/master/include/raft.h) for -documentation details, but here's a quick high-level guide of what you'll need -to do (error handling is omitted for brevity). +It is recommended that you read [raft.h](./include/raft.h) for documentation +details, but here's a quick high-level guide of what you'll need to do (error +handling is omitted for brevity). Create an instance of the stock ```raft_io``` interface implementation (or implement your own one if the one that comes with the library really does not diff --git a/README_CH.md b/README_CH.md index cbf0a918..ac680b52 100644 --- a/README_CH.md +++ b/README_CH.md @@ -1,6 +1,6 @@ # c-raft -[![CI Tests](https://github.com/cowsql/raft/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/cowsql/raft/actions/workflows/build-and-test.yml) [![codecov](https://codecov.io/gh/cowsql/raft/branch/master/graph/badge.svg)](https://codecov.io/gh/cowsql/raft) [![Documentation Status](https://readthedocs.org/projects/raft/badge/?version=latest)](https://raft.readthedocs.io/en/latest/?badge=latest) +[![CI Tests](https://github.com/cowsql/raft/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/cowsql/raft/actions/workflows/build-and-test.yml) [![codecov](https://codecov.io/gh/cowsql/raft/branch/main/graph/badge.svg)](https://codecov.io/gh/cowsql/raft) [![Documentation Status](https://readthedocs.org/projects/raft/badge/?version=latest)](https://raft.readthedocs.io/en/latest/?badge=latest) **注意**:中文文档有可能未及时更新,请以最新的英文[readme](./README.md)为准。 @@ -11,7 +11,7 @@ raft库采用模块化设计,核心部分实现了完全独立于平台的raft 在使用默认选项构建库时,基于 [libuv](http://libuv.org)提供了 I/O 接口的库存实现,适合绝大多数应用场景。唯一的问题是它目前 需要 Linux,因为它使用 Linux [AIO](http://man7.org/linux/man-pages/man2/io_submit.2.html) API 用于磁盘输入/输出。欢迎添加补丁以支持更多的平台。 -可以通过[raft.h](https://github.com/cowsql/raft/blob/master/include/raft.h)来查看全部接口。 +可以通过[raft.h](https://github.com/cowsql/raft/blob/main/include/raft.h)来查看全部接口。 ## license @@ -66,7 +66,7 @@ make ## Example -理解如何使用raft库的最好方式是阅读源码目录下的[example server](https://github.com/cowsql/raft/blob/master/example/server.c)。 +理解如何使用raft库的最好方式是阅读源码目录下的[example server](./example/server.c)。 可以运行如下命令来了解example server的运行情况: @@ -78,7 +78,7 @@ make ## Quick guide -以下是一个如何使用raft库的快速指南(为了简洁起见,省略了错误处理),要想了解详细的信息建议阅读[raft.h](https://github.com/cowsql/raft/blob/master/include/raft.h)。 +以下是一个如何使用raft库的快速指南(为了简洁起见,省略了错误处理),要想了解详细的信息建议阅读[raft.h](./include/raft.h)。 1. 创建一个`raft_io` 接口实现的实例(如果库附带的接口确实不适合,则实现您自己的实例):