提交 ab73a08d 编写于 作者: 麦壳饼's avatar 麦壳饼

修改IoTDB的文档。

上级 35f86386
# Cassandra Health Check
# IoTDB Health Check
This health check verifies the ability to communicate with a Cassandra server.
This health check verifies the ability to communicate with a IoTDB server.
## Example Usage
With all of the following examples, you can additionally add the following parameters:
- `name`: The health check name. Default if not specified is `Cassandra`.
- `name`: The health check name. Default if not specified is `IoTDB`.
- `failureStatus`: The `HealthStatus` that should be reported when the health check fails. Default is `HealthStatus.Unhealthy`.
- `tags`: A list of tags that can be used to filter sets of health checks.
- `timeout`: A `System.TimeSpan` representing the timeout of the check.
### Basic
This will create a new `CassandraClient` and reuse it on every request to get the health check result. Use
the extension method where you provide the `Uri` to connect with.
This will create a new `SessionPool` and reuse it on every request to get the health check result. Use
the extension method where you provide the `connectionString` to connect with.
```csharp
public void ConfigureServices(IServiceCollection services)
{
services.AddHealthChecks()
.AddCassandra("");
.AddIoTDB("");
}
```
......@@ -30,11 +30,8 @@ you must ensure automatic recovery is enabled so that the `CassandraClient` can
```csharp
public void ConfigureServices(IServiceCollection services)
{
services.AddSingleton<CassandraClient>(sp => Cluster.Builder()
.AddContactPoint("127.0.0.1")
.WithGraphOptions(new GraphOptions().SetName("demo"))
.Build())
services.AddSingleton<SessionPool>(sp => new SessionPool(connectionString))
.AddHealthChecks()
.AddCassandra();
.AddIoTDB();
}
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册