Skip to content

Commit f2be224

Browse files
Apply suggestions from code review
Co-authored-by: Heitor Tashiro Sergent <[email protected]>
1 parent 932b5b9 commit f2be224

File tree

9 files changed

+16
-16
lines changed

9 files changed

+16
-16
lines changed

docs/sources/next/javascript-api/k6-experimental/grpc/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ weight: 02
1010

1111
The `k6/experimental/grpc` module is an extension of the [`k6/net/grpc`](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc). It provides a [gRPC](https://grpc.io/) client for Remote Procedure Calls (RPC) over HTTP/2.
1212

13-
Prior k6 `v0.49` the key-difference between the two modules was streaming support, but it has been added to the `k6/net/grpc` module as well. We recommend using the `k6/net/grpc` module.
13+
Starting on k6 v0.49, the `k6/net/grpc` module provides streaming support. We recommend using the `k6/net/grpc` module instead of `k6/experimental/grpc`.
1414

1515
| Class/Method | Description |
1616
| ------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |

docs/sources/next/javascript-api/k6-net-grpc/_index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ weight: 11
66

77
# k6/net/grpc
88

9-
The `k6/net/grpc` module provides a [gRPC](https://grpc.io/) client for Remote Procedure Calls (RPC) over HTTP/2. It supports unary and streaming (starting [v0.49](https://github.com/grafana/k6/releases/tag/v0.49.0)) RPCs.
9+
The `k6/net/grpc` module provides a [gRPC](https://grpc.io/) client for Remote Procedure Calls (RPC) over HTTP/2. It supports unary and streaming (starting on [v0.49](https://github.com/grafana/k6/releases/tag/v0.49.0)) RPCs.
1010

1111
| Class/Method | Description |
1212
| --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -19,9 +19,9 @@ The `k6/net/grpc` module provides a [gRPC](https://grpc.io/) client for Remote P
1919
| [Response](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc/response) | Returned by RPC requests. |
2020
| [Constants](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc/constants) | Define constants to distinguish between [gRPC Response](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc/response) statuses. |
2121
| [Stream](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc/stream) | Creates a new GRPC stream. |
22-
| [Stream.on(event, handler)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc/stream/stream-on) | Adds a new listener to one of the possible stream event's. |
22+
| [Stream.on(event, handler)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc/stream/stream-on) | Adds a new listener to one of the possible stream events. |
2323
| [Stream.write(message)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc/stream/stream-write) | Writes a message to the stream. |
24-
| [Stream.end()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc/stream/stream-end) | Signals to server that client finished sending. |
24+
| [Stream.end()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc/stream/stream-end) | Signals to the server that the client has finished sending. |
2525

2626
## gRPC metrics
2727

docs/sources/next/javascript-api/k6-net-grpc/stream/_index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
22
title: Stream
3-
excerpt: 'GRPC Streams'
3+
description: gRPC Streams
44
weight: 30
55
---
66

77
# Stream
88

9-
Using a GRPC client creates a stream. An important note that the client should be already connected (client.connect called) to the server before creating a stream.
9+
Using a gRPC client creates a stream. The client should be connected to the server (`client.connect` called) before creating a stream.
1010

1111
| Method | Description |
1212
| ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
13-
| [Stream(client, url, [,params])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc/stream) | Using a GRPC client creates a stream. |
13+
Using a gRPC client creates a stream.
1414
| [Stream.write(message)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc/stream/stream-write) | Writes a message to the stream. |
15-
| [Stream.on(event, handler)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc/stream/stream-on) | Set up handler functions for various events on the GRPC stream. |
15+
| [Stream.on(event, handler)](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc/stream/stream-on) | Sets up handler functions for various events on the gRPC stream. |
1616
| [Stream.end()](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc/stream/stream-end) | Signals to the server that the client has finished sending. |
1717

1818
### Examples

docs/sources/next/javascript-api/k6-net-grpc/stream/stream-end.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: 'Stream.end()'
3-
excerpt: 'Signals to the server that the client has finished sending.'
3+
description: 'Signals to the server that the client has finished sending.'
44
weight: 40
55
---
66

docs/sources/next/javascript-api/k6-net-grpc/stream/stream-error.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: 'Error'
33
head_title: 'gRPC.Error'
4-
excerpt: 'The error object of a gRPC stream.'
4+
description: 'The error object of a gRPC stream.'
55
weight: 15
66
---
77

@@ -12,5 +12,5 @@ The error object is the object that is passed to the `error` event handler funct
1212
| Name | Type | Description |
1313
| --------------- | ------ | ------------------------------------- |
1414
| `Error.code` | number | A gRPC error code. |
15-
| `Error.details` | array | A list details attached to the error. |
15+
| `Error.details` | array | A list of details attached to the error. |
1616
| `Error.message` | string | An original error message. |

docs/sources/next/javascript-api/k6-net-grpc/stream/stream-on.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
title: 'Stream.on()'
3-
excerpt: 'Set up handler functions for various events on the GRPC stream.'
3+
description: 'Set up handler functions for various events on the GRPC stream.'
44
weight: 10
55
---
66

77
# Stream.on()
88

9-
Set up handler functions for various events on the GRPC stream.
9+
Set up handler functions for various events on the gRPC stream.
1010

1111
| Parameter | Type | Description |
1212
| --------- | -------- | -------------------------------------------- |

docs/sources/next/javascript-api/k6-net-grpc/stream/stream-write.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: 'Stream.write()'
3-
excerpt: 'Writes a message to the stream.'
3+
description: 'Writes a message to the stream.'
44
weight: 40
55
---
66

docs/sources/next/shared/experimental-grpc-module.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Experimental grpc module admonition
44

55
{{% admonition type="caution" %}}
66

7-
Staring `k6` version `v0.49` the experimental module `k6/experimental/grpc` has been graduated, and its functionality is available in [the `k6/net/grpc` module](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc/). The `k6/experimental/grpc` is deprecated and will be removed in `v0.51.0`.
7+
Starting on k6 `v0.49`, the experimental module `k6/experimental/grpc` has been graduated, and its functionality is now available in the [`k6/net/grpc` module](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-net-grpc/). The `k6/experimental/grpc` is deprecated and will be removed in `v0.51.0`.
88

99
To migrate your scripts, replace all `k6/experimental/grpc` imports with `k6/net/grpc`.
1010

docs/sources/next/using-k6/metrics/reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,6 @@ k6 emits the following metrics when it interacts with a service through the [`gR
103103

104104
{{% admonition type="note" %}}
105105

106-
Steams-related metrics (`grpc_streams*`) are available only on `k6` version `0.49.0` or higher or when using the `k6/experimental/grpc` module which is available on `k6` version `0.45.0`.
106+
Steams-related metrics (`grpc_streams*`) are available only on `k6` version `0.49.0` or higher or when using the `k6/experimental/grpc` module, which is available on `k6` version `0.45.0`.
107107

108108
{{% /admonition %}}

0 commit comments

Comments
 (0)