diff --git a/src/guide/develop/client_design.md b/src/guide/develop/client_design.md index 93d854c3..2506ea25 100644 --- a/src/guide/develop/client_design.md +++ b/src/guide/develop/client_design.md @@ -30,6 +30,7 @@ classDiagram + enum compressMethod // gzip, zstd, br + TlsConfig tlsConfig // nullable, language specific + void close() + + GRPCConfig grpcConfig // if null, call WriteByGRPC will nothing to do, otherwise send write request by gRPC } class Address { @@ -48,6 +49,15 @@ classDiagram + Duration batchInterval // must be greater than 0 + int batchSize // must be greater than 0, if set too large, may cause client overflow or server-side rejected the request. } + + class GRPCConfig { + + List~Address~ addresses + + AuthConfig authConfig + + BatchConfig batchConfig + + enum compressMethod // gzip, zstd, br + + TlsConfig tlsConfig + + timeout + } OpenGeminiClient "1" *-- "many" Address: contains OpenGeminiClient *-- AuthConfig: contains @@ -148,6 +158,7 @@ classDiagram + WritePointWithRp(String database, String rp, Point point) + WriteBatchPoints(String database, BatchPoints batchPoints) + WriteBatchPointsWithRp(String database, String rp, BatchPoints batchPoints) + + WriteByGRPC(req WriteRequest) // WriteRequest build from RecordBuilder } class BatchPoints { + List~Point~ points @@ -169,6 +180,20 @@ classDiagram + SetPrecision(type) + SetMeasurement(name) } + + class RecordBuilder { // new from NewRecordBuilder with database and retention policy params + + RecordBuilder Authenticate(String username, String password) + + RecordBuilder AddRecord(RecordLine line) // RecordLine build from RecordLineBuilder + + WriteRequest Build() + } + + class RecordLineBuilder { // new from NewRecordLineBuilder with measurement param + + RecordLineBuilder AddTag(String key, String value) + + RecordLineBuilder AddTags(map[String]String) + + RecordLineBuilder AddField(String key, Any value) + + RecordLineBuilder AddFields(map[String]Any) + + RecordLine Build(Time time) + } BatchPoints "1" *-- "many" Point: contains ``` diff --git a/src/zh/guide/develop/client_design.md b/src/zh/guide/develop/client_design.md index ca887445..68fe17d7 100644 --- a/src/zh/guide/develop/client_design.md +++ b/src/zh/guide/develop/client_design.md @@ -31,6 +31,7 @@ classDiagram + enum compressMethod // gzip, zstd, br + TlsConfig tlsConfig // nullable, language specific + void close() + + GRPCConfig grpcConfig // if null, call WriteByGRPC will nothing to do, otherwise send write request by gRPC } class Address { @@ -50,6 +51,15 @@ classDiagram + int batchSize // must be greater than 0 } + class GRPCConfig { + + List~Address~ addresses + + AuthConfig authConfig + + BatchConfig batchConfig + + enum compressMethod // gzip, zstd, br + + TlsConfig tlsConfig + + timeout + } + OpenGeminiClient "1" *-- "many" Address: contains OpenGeminiClient *-- AuthConfig: contains OpenGeminiClient *-- BatchConfig: contains @@ -149,6 +159,7 @@ classDiagram + WritePointWithRp(String database, String rp, Point point) + WriteBatchPoints(String database, BatchPoints batchPoints) + WriteBatchPointsWithRp(String database, String rp, BatchPoints batchPoints) + + WriteByGRPC(req WriteRequest) // WriteRequest build from RecordBuilder } class BatchPoints { + List~Point~ points @@ -171,6 +182,20 @@ classDiagram + SetMeasurement(name) } + class RecordBuilder { // new from NewRecordBuilder with database and retention policy params + + RecordBuilder Authenticate(String username, String password) + + RecordBuilder AddRecord(RecordLine line) // RecordLine build from RecordLineBuilder + + WriteRequest Build() + } + + class RecordLineBuilder { // new from NewRecordLineBuilder with measurement param + + RecordLineBuilder AddTag(String key, String value) + + RecordLineBuilder AddTags(map[String]String) + + RecordLineBuilder AddField(String key, Any value) + + RecordLineBuilder AddFields(map[String]Any) + + RecordLine Build(Time time) + } + BatchPoints "1" *-- "many" Point: contains ```