Skip to content

Commit

Permalink
Add nano precision option. (#283)
Browse files Browse the repository at this point in the history
* Add nano precision option.
* Unsure whether to add test as existing tests dont test the format as it is.
* Fix indentation
* Add nanoPrecision to api-docs

---------

Co-authored-by: Mostafa Moradian <[email protected]>
  • Loading branch information
ChrisDev83 and mostafa authored Apr 10, 2024
1 parent d4bd090 commit 0fdd2e1
Show file tree
Hide file tree
Showing 19 changed files with 105 additions and 85 deletions.
2 changes: 1 addition & 1 deletion api-docs/docs/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions api-docs/docs/classes/Connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ connection.close();

#### Defined in

[index.d.ts:399](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L399)
[index.d.ts:400](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L400)

## Methods

Expand All @@ -64,7 +64,7 @@ connection.close();

#### Defined in

[index.d.ts:425](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L425)
[index.d.ts:426](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L426)

---

Expand All @@ -89,7 +89,7 @@ Create a new topic.

#### Defined in

[index.d.ts:406](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L406)
[index.d.ts:407](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L407)

---

Expand All @@ -114,7 +114,7 @@ Delete a topic.

#### Defined in

[index.d.ts:413](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L413)
[index.d.ts:414](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L414)

---

Expand All @@ -133,4 +133,4 @@ List topics.

#### Defined in

[index.d.ts:419](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L419)
[index.d.ts:420](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L420)
8 changes: 4 additions & 4 deletions api-docs/docs/classes/Reader.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const reader = new Reader({
});

// In VU code (default function)
const messages = reader.consume({ limit: 10 });
const messages = reader.consume({ limit: 10, nanoPrecision: false });

// In teardown function
reader.close();
Expand Down Expand Up @@ -43,7 +43,7 @@ reader.close();

#### Defined in

[index.d.ts:358](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L358)
[index.d.ts:359](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L359)

## Methods

Expand All @@ -63,7 +63,7 @@ reader.close();

#### Defined in

[index.d.ts:371](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L371)
[index.d.ts:372](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L372)

---

Expand All @@ -88,4 +88,4 @@ Read messages from Kafka.

#### Defined in

[index.d.ts:365](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L365)
[index.d.ts:366](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L366)
12 changes: 6 additions & 6 deletions api-docs/docs/classes/SchemaRegistry.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ writer.produce({

#### Defined in

[index.d.ts:487](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L487)
[index.d.ts:488](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L488)

## Methods

Expand All @@ -104,7 +104,7 @@ Create or update a schema on Schema Registry.

#### Defined in

[index.d.ts:501](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L501)
[index.d.ts:502](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L502)

---

Expand All @@ -129,7 +129,7 @@ Deserializes the given data and schema into its original form.

#### Defined in

[index.d.ts:522](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L522)
[index.d.ts:523](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L523)

---

Expand All @@ -154,7 +154,7 @@ Get a schema from Schema Registry by version and subject.

#### Defined in

[index.d.ts:494](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L494)
[index.d.ts:495](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L495)

---

Expand All @@ -179,7 +179,7 @@ Returns the subject name for the given SubjectNameConfig.

#### Defined in

[index.d.ts:508](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L508)
[index.d.ts:509](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L509)

---

Expand All @@ -204,4 +204,4 @@ Serializes the given data and schema into a byte array.

#### Defined in

[index.d.ts:515](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L515)
[index.d.ts:516](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L516)
6 changes: 3 additions & 3 deletions api-docs/docs/classes/Writer.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ writer.close();

#### Defined in

[index.d.ts:316](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L316)
[index.d.ts:317](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L317)

## Methods

Expand All @@ -71,7 +71,7 @@ writer.close();

#### Defined in

[index.d.ts:329](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L329)
[index.d.ts:330](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L330)

---

Expand All @@ -96,4 +96,4 @@ Write messages to Kafka.

#### Defined in

[index.d.ts:323](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L323)
[index.d.ts:324](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L324)
4 changes: 2 additions & 2 deletions api-docs/docs/interfaces/ConfigEntry.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#### Defined in

[index.d.ts:222](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L222)
[index.d.ts:223](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L223)

---

Expand All @@ -25,4 +25,4 @@

#### Defined in

[index.d.ts:223](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L223)
[index.d.ts:224](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L224)
6 changes: 3 additions & 3 deletions api-docs/docs/interfaces/ConnectionConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#### Defined in

[index.d.ts:209](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L209)
[index.d.ts:210](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L210)

---

Expand All @@ -26,7 +26,7 @@

#### Defined in

[index.d.ts:210](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L210)
[index.d.ts:211](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L211)

---

Expand All @@ -36,4 +36,4 @@

#### Defined in

[index.d.ts:211](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L211)
[index.d.ts:212](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L212)
11 changes: 11 additions & 0 deletions api-docs/docs/interfaces/ConsumeConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Properties

- [limit](ConsumeConfig.md#limit)
- [nanoPrecision](ConsumeConfig.md#nanoprecision)

## Properties

Expand All @@ -15,3 +16,13 @@
#### Defined in

[index.d.ts:204](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L204)

---

### nanoPrecision

**nanoPrecision**: `boolean`

#### Defined in

[index.d.ts:205](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L205)
6 changes: 3 additions & 3 deletions api-docs/docs/interfaces/Container.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#### Defined in

[index.d.ts:262](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L262)
[index.d.ts:263](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L263)

---

Expand All @@ -26,7 +26,7 @@

#### Defined in

[index.d.ts:263](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L263)
[index.d.ts:264](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L264)

---

Expand All @@ -36,4 +36,4 @@

#### Defined in

[index.d.ts:264](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L264)
[index.d.ts:265](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L265)
6 changes: 3 additions & 3 deletions api-docs/docs/interfaces/JKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#### Defined in

[index.d.ts:277](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L277)
[index.d.ts:278](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L278)

---

Expand All @@ -26,7 +26,7 @@

#### Defined in

[index.d.ts:278](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L278)
[index.d.ts:279](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L279)

---

Expand All @@ -36,4 +36,4 @@

#### Defined in

[index.d.ts:279](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L279)
[index.d.ts:280](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L280)
12 changes: 6 additions & 6 deletions api-docs/docs/interfaces/JKSConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#### Defined in

[index.d.ts:270](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L270)
[index.d.ts:271](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L271)

---

Expand All @@ -29,7 +29,7 @@

#### Defined in

[index.d.ts:271](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L271)
[index.d.ts:272](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L272)

---

Expand All @@ -39,7 +39,7 @@

#### Defined in

[index.d.ts:272](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L272)
[index.d.ts:273](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L273)

---

Expand All @@ -49,7 +49,7 @@

#### Defined in

[index.d.ts:269](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L269)
[index.d.ts:270](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L270)

---

Expand All @@ -59,7 +59,7 @@

#### Defined in

[index.d.ts:268](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L268)
[index.d.ts:269](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L269)

---

Expand All @@ -69,4 +69,4 @@

#### Defined in

[index.d.ts:273](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L273)
[index.d.ts:274](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L274)
6 changes: 3 additions & 3 deletions api-docs/docs/interfaces/Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#### Defined in

[index.d.ts:238](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L238)
[index.d.ts:239](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L239)

---

Expand All @@ -26,7 +26,7 @@

#### Defined in

[index.d.ts:239](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L239)
[index.d.ts:240](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L240)

---

Expand All @@ -36,4 +36,4 @@

#### Defined in

[index.d.ts:240](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L240)
[index.d.ts:241](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L241)
4 changes: 2 additions & 2 deletions api-docs/docs/interfaces/ReplicaAssignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#### Defined in

[index.d.ts:216](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L216)
[index.d.ts:217](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L217)

---

Expand All @@ -25,4 +25,4 @@

#### Defined in

[index.d.ts:217](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L217)
[index.d.ts:218](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L218)
Loading

0 comments on commit 0fdd2e1

Please sign in to comment.