From 389a24b0df26a84e7f2501e4b59fc1c245e5811f Mon Sep 17 00:00:00 2001 From: Mostafa Moradian Date: Mon, 17 Oct 2022 18:46:36 +0200 Subject: [PATCH 1/5] Add latest commit hash of kafka-go for testing ReadBatchTimeout --- go.sum | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/go.sum b/go.sum index 8c46ffe..30b1d84 100644 --- a/go.sum +++ b/go.sum @@ -148,8 +148,6 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= -github.com/klauspost/compress v1.15.12 h1:YClS/PImqYbn+UILDnqxQCZ3RehC9N318SU3kElDUEM= -github.com/klauspost/compress v1.15.12/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= github.com/klauspost/compress v1.15.13 h1:NFn1Wr8cfnenSJSA46lLq4wHCcBzKTSjnBIexDMMOV0= github.com/klauspost/compress v1.15.13/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= @@ -204,8 +202,6 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/santhosh-tekuri/jsonschema/v5 v5.0.0/go.mod h1:FKdcjfQW6rpZSnxxUvEA5H/cDPdvJ/SZJQLWWXWGrZ0= -github.com/santhosh-tekuri/jsonschema/v5 v5.1.0 h1:wSUNu/w/7OQ0Y3NVnfTU5uxzXY4uMpXW92VXEJKqBB0= -github.com/santhosh-tekuri/jsonschema/v5 v5.1.0/go.mod h1:FKdcjfQW6rpZSnxxUvEA5H/cDPdvJ/SZJQLWWXWGrZ0= github.com/santhosh-tekuri/jsonschema/v5 v5.1.1 h1:lEOLY2vyGIqKWUI9nzsOJRV3mb3WC9dXYORsLEUcoeY= github.com/santhosh-tekuri/jsonschema/v5 v5.1.1/go.mod h1:FKdcjfQW6rpZSnxxUvEA5H/cDPdvJ/SZJQLWWXWGrZ0= github.com/segmentio/kafka-go v0.4.38 h1:iQdOBbUSdfuYlFpvjuALgj7N6DrdPA0HfB4AhREOdtg= @@ -234,8 +230,6 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.k6.io/k6 v0.41.0 h1:w/J10BV3MGahDF3UsT3WESNBCpsw7soxj9GaLCGTf4I= -go.k6.io/k6 v0.41.0/go.mod h1:ZrgrR06UZbzZt9u+so/yQhlkJFH5gkJ3qCp1hwq1mEU= go.k6.io/k6 v0.42.0 h1:TXYyaNPI5GuX2k+r0EDqawdAkdU2Kuxl68GpBbwSkUk= go.k6.io/k6 v0.42.0/go.mod h1:BY6vVmsNSaetHmPqQ8D6VMJJRptzwevdSpURQmSkrMQ= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -252,8 +246,6 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.3.0 h1:a06MkbcxBrEFc0w0QIZWXrH/9cCX6KJyWbBOIwAn+7A= -golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8= golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -324,7 +316,6 @@ golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220706163947-c90051bbdb60/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU= golang.org/x/net v0.3.0 h1:VWL6FNY2bEEmsGVKabSlHu5Irp34xmMRoqb/9lF9lxk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -392,8 +383,6 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -406,15 +395,11 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.2.0 h1:52I/1L54xyEQAYdtcSuxtiT84KGYTBGXwayxmIpNJhE= -golang.org/x/time v0.2.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -531,7 +516,6 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08 h1:pc16UedxnxXXtGxHCSUhafAoVHQZ0yXl8ZelMH4EETc= google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 h1:hrbNEivu7Zn1pxvHk6MBrq9iE22woVILTHqexqBxe6I= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -560,7 +544,7 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= From 86151f4ac2138034f1df05093fb61e4fc8fc5897 Mon Sep 17 00:00:00 2001 From: Mostafa Moradian Date: Mon, 17 Oct 2022 18:48:44 +0200 Subject: [PATCH 2/5] Make ReadBatchTimeout configurable --- reader.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reader.go b/reader.go index 2fe467b..6ad7162 100644 --- a/reader.go +++ b/reader.go @@ -48,6 +48,7 @@ type ReaderConfig struct { GroupTopics []string `json:"groupTopics"` GroupBalancers []string `json:"groupBalancers"` MaxWait time.Duration `json:"maxWait"` + ReadBatchTimeout time.Duration `json:"readBatchTimeout"` ReadLagInterval time.Duration `json:"readLagInterval"` HeartbeatInterval time.Duration `json:"heartbeatInterval"` CommitInterval time.Duration `json:"commitInterval"` @@ -187,6 +188,7 @@ func (k *Kafka) reader(readerConfig *ReaderConfig) *kafkago.Reader { MinBytes: readerConfig.MinBytes, MaxBytes: readerConfig.MaxBytes, MaxWait: readerConfig.MaxWait, + ReadBatchTimeout: readerConfig.ReadBatchTimeout, ReadLagInterval: readerConfig.ReadLagInterval, GroupBalancers: groupBalancers, HeartbeatInterval: readerConfig.HeartbeatInterval, From b496cd86e475889c9bb798f0944311ee160d86a1 Mon Sep 17 00:00:00 2001 From: Mostafa Moradian Date: Mon, 17 Oct 2022 18:50:13 +0200 Subject: [PATCH 3/5] Update API docs --- api-docs/docs/classes/SchemaRegistry.md | 12 ++--- api-docs/docs/interfaces/ReaderConfig.md | 11 +++++ api-docs/index.d.ts | 57 ++++++++++++------------ 3 files changed, 46 insertions(+), 34 deletions(-) diff --git a/api-docs/docs/classes/SchemaRegistry.md b/api-docs/docs/classes/SchemaRegistry.md index 3f44fc2..1ec0839 100644 --- a/api-docs/docs/classes/SchemaRegistry.md +++ b/api-docs/docs/classes/SchemaRegistry.md @@ -79,7 +79,7 @@ writer.produce({ #### Defined in -[index.d.ts:442](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L442) +[index.d.ts:443](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L443) ## Methods @@ -104,7 +104,7 @@ Create or update a schema on Schema Registry. #### Defined in -[index.d.ts:456](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L456) +[index.d.ts:457](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L457) --- @@ -129,7 +129,7 @@ Deserializes the given data and schema into its original form. #### Defined in -[index.d.ts:477](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L477) +[index.d.ts:478](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L478) --- @@ -154,7 +154,7 @@ Get a schema from Schema Registry by version and subject. #### Defined in -[index.d.ts:449](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L449) +[index.d.ts:450](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L450) --- @@ -179,7 +179,7 @@ Returns the subject name for the given SubjectNameConfig. #### Defined in -[index.d.ts:463](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L463) +[index.d.ts:464](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L464) --- @@ -204,4 +204,4 @@ Serializes the given data and schema into a byte array. #### Defined in -[index.d.ts:470](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L470) +[index.d.ts:471](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L471) diff --git a/api-docs/docs/interfaces/ReaderConfig.md b/api-docs/docs/interfaces/ReaderConfig.md index e78ca4b..e8ee2c8 100644 --- a/api-docs/docs/interfaces/ReaderConfig.md +++ b/api-docs/docs/interfaces/ReaderConfig.md @@ -23,6 +23,7 @@ - [queueCapacity](ReaderConfig.md#queuecapacity) - [readBackoffMax](ReaderConfig.md#readbackoffmax) - [readBackoffMin](ReaderConfig.md#readbackoffmin) +- [readBatchTimeout](ReaderConfig.md#readbatchtimeout) - [readLagInterval](ReaderConfig.md#readlaginterval) - [rebalanceTimeout](ReaderConfig.md#rebalancetimeout) - [retentionTime](ReaderConfig.md#retentiontime) @@ -223,6 +224,16 @@ [index.d.ts:174](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L174) +___ + +### readBatchTimeout + +• **readBatchTimeout**: `number` + +#### Defined in + +[index.d.ts:161](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L161) + --- ### readLagInterval diff --git a/api-docs/index.d.ts b/api-docs/index.d.ts index de28b71..ace824b 100644 --- a/api-docs/index.d.ts +++ b/api-docs/index.d.ts @@ -151,34 +151,35 @@ export interface ProduceConfig { /* Configuration for creating a Reader instance. */ export interface ReaderConfig { - brokers: string[]; - groupID: string; - groupTopics: string[]; - topic: string; - partition: number; - queueCapacity: number; - minBytes: number; - maxBytes: number; - maxWait: number; - readLagInterval: number; - groupBalancers: GROUP_BALANCERS[]; - heartbeatInterval: number; - commitInterval: number; - partitionWatchInterval: number; - watchPartitionChanges: boolean; - sessionTimeout: number; - rebalanceTimeout: number; - joinGroupBackoff: number; - retentionTime: number; - startOffset: number; - readBackoffMin: number; - readBackoffMax: number; - connectLogger: boolean; - maxAttempts: number; - isolationLevel: ISOLATION_LEVEL; - offset: number; - sasl: SASLConfig; - tls: TLSConfig; + brokers: string[]; + groupID: string; + groupTopics: string[]; + topic: string; + partition: number; + queueCapacity: number; + minBytes: number; + maxBytes: number; + readBatchTimeout: number; + maxWait: number; + readLagInterval: number; + groupBalancers: GROUP_BALANCERS[]; + heartbeatInterval: number; + commitInterval: number; + partitionWatchInterval: number; + watchPartitionChanges: boolean; + sessionTimeout: number; + rebalanceTimeout: number; + joinGroupBackoff: number; + retentionTime: number; + startOffset: number; + readBackoffMin: number; + readBackoffMax: number; + connectLogger: boolean; + maxAttempts: number; + isolationLevel: ISOLATION_LEVEL; + offset: number; + sasl: SASLConfig; + tls: TLSConfig; } /* Configuration for Consume method. */ From 1ba5792f4077902581bcb2fdca0b82f6acd740a3 Mon Sep 17 00:00:00 2001 From: Mostafa Moradian Date: Thu, 5 Jan 2023 14:56:02 +0100 Subject: [PATCH 4/5] Run generate-docs and prettier again to update the docs --- api-docs/docs/classes/Connection.md | 10 ++-- api-docs/docs/classes/Reader.md | 6 +- api-docs/docs/classes/Writer.md | 6 +- api-docs/docs/interfaces/ConfigEntry.md | 4 +- api-docs/docs/interfaces/ConnectionConfig.md | 6 +- api-docs/docs/interfaces/ConsumeConfig.md | 2 +- api-docs/docs/interfaces/Container.md | 6 +- api-docs/docs/interfaces/ReaderConfig.md | 44 +++++++------- api-docs/docs/interfaces/ReplicaAssignment.md | 4 +- api-docs/docs/interfaces/Schema.md | 6 +- api-docs/docs/interfaces/SubjectNameConfig.md | 8 +-- api-docs/docs/interfaces/TopicConfig.md | 10 ++-- api-docs/index.d.ts | 58 +++++++++---------- 13 files changed, 85 insertions(+), 85 deletions(-) diff --git a/api-docs/docs/classes/Connection.md b/api-docs/docs/classes/Connection.md index 3fe9c4d..977122b 100644 --- a/api-docs/docs/classes/Connection.md +++ b/api-docs/docs/classes/Connection.md @@ -44,7 +44,7 @@ connection.close(); #### Defined in -[index.d.ts:354](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L354) +[index.d.ts:355](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L355) ## Methods @@ -64,7 +64,7 @@ connection.close(); #### Defined in -[index.d.ts:380](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L380) +[index.d.ts:381](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L381) --- @@ -89,7 +89,7 @@ Create a new topic. #### Defined in -[index.d.ts:361](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L361) +[index.d.ts:362](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L362) --- @@ -114,7 +114,7 @@ Delete a topic. #### Defined in -[index.d.ts:368](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L368) +[index.d.ts:369](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L369) --- @@ -133,4 +133,4 @@ List topics. #### Defined in -[index.d.ts:374](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L374) +[index.d.ts:375](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L375) diff --git a/api-docs/docs/classes/Reader.md b/api-docs/docs/classes/Reader.md index 79f74d6..336571b 100644 --- a/api-docs/docs/classes/Reader.md +++ b/api-docs/docs/classes/Reader.md @@ -43,7 +43,7 @@ reader.close(); #### Defined in -[index.d.ts:313](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L313) +[index.d.ts:314](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L314) ## Methods @@ -63,7 +63,7 @@ reader.close(); #### Defined in -[index.d.ts:326](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L326) +[index.d.ts:327](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L327) --- @@ -88,4 +88,4 @@ Read messages from Kafka. #### Defined in -[index.d.ts:320](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L320) +[index.d.ts:321](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L321) diff --git a/api-docs/docs/classes/Writer.md b/api-docs/docs/classes/Writer.md index 12b55df..2601e08 100644 --- a/api-docs/docs/classes/Writer.md +++ b/api-docs/docs/classes/Writer.md @@ -51,7 +51,7 @@ writer.close(); #### 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) ## Methods @@ -71,7 +71,7 @@ writer.close(); #### Defined in -[index.d.ts:284](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L284) +[index.d.ts:285](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L285) --- @@ -96,4 +96,4 @@ Write messages to Kafka. #### 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) diff --git a/api-docs/docs/interfaces/ConfigEntry.md b/api-docs/docs/interfaces/ConfigEntry.md index 2d0d6ab..20782fc 100644 --- a/api-docs/docs/interfaces/ConfigEntry.md +++ b/api-docs/docs/interfaces/ConfigEntry.md @@ -15,7 +15,7 @@ #### Defined in -[index.d.ts:204](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L204) +[index.d.ts:205](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L205) --- @@ -25,4 +25,4 @@ #### Defined in -[index.d.ts:205](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L205) +[index.d.ts:206](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L206) diff --git a/api-docs/docs/interfaces/ConnectionConfig.md b/api-docs/docs/interfaces/ConnectionConfig.md index adcb69c..fd6c102 100644 --- a/api-docs/docs/interfaces/ConnectionConfig.md +++ b/api-docs/docs/interfaces/ConnectionConfig.md @@ -16,7 +16,7 @@ #### Defined in -[index.d.ts:191](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L191) +[index.d.ts:192](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L192) --- @@ -26,7 +26,7 @@ #### Defined in -[index.d.ts:192](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L192) +[index.d.ts:193](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L193) --- @@ -36,4 +36,4 @@ #### Defined in -[index.d.ts:193](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L193) +[index.d.ts:194](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L194) diff --git a/api-docs/docs/interfaces/ConsumeConfig.md b/api-docs/docs/interfaces/ConsumeConfig.md index 4169857..c020393 100644 --- a/api-docs/docs/interfaces/ConsumeConfig.md +++ b/api-docs/docs/interfaces/ConsumeConfig.md @@ -14,4 +14,4 @@ #### Defined in -[index.d.ts:186](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L186) +[index.d.ts:187](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L187) diff --git a/api-docs/docs/interfaces/Container.md b/api-docs/docs/interfaces/Container.md index ef044de..f665eb2 100644 --- a/api-docs/docs/interfaces/Container.md +++ b/api-docs/docs/interfaces/Container.md @@ -16,7 +16,7 @@ #### Defined in -[index.d.ts:232](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L232) +[index.d.ts:233](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L233) --- @@ -26,7 +26,7 @@ #### Defined in -[index.d.ts:233](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L233) +[index.d.ts:234](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L234) --- @@ -36,4 +36,4 @@ #### Defined in -[index.d.ts:234](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L234) +[index.d.ts:235](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L235) diff --git a/api-docs/docs/interfaces/ReaderConfig.md b/api-docs/docs/interfaces/ReaderConfig.md index e8ee2c8..bc45e97 100644 --- a/api-docs/docs/interfaces/ReaderConfig.md +++ b/api-docs/docs/interfaces/ReaderConfig.md @@ -52,7 +52,7 @@ #### Defined in -[index.d.ts:166](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L166) +[index.d.ts:167](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L167) --- @@ -62,7 +62,7 @@ #### Defined in -[index.d.ts:176](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L176) +[index.d.ts:177](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L177) --- @@ -72,7 +72,7 @@ #### Defined in -[index.d.ts:164](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L164) +[index.d.ts:165](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L165) --- @@ -102,7 +102,7 @@ #### Defined in -[index.d.ts:165](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L165) +[index.d.ts:166](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L166) --- @@ -112,7 +112,7 @@ #### Defined in -[index.d.ts:178](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L178) +[index.d.ts:179](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L179) --- @@ -122,7 +122,7 @@ #### Defined in -[index.d.ts:171](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L171) +[index.d.ts:172](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L172) --- @@ -132,7 +132,7 @@ #### Defined in -[index.d.ts:177](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L177) +[index.d.ts:178](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L178) --- @@ -152,7 +152,7 @@ #### Defined in -[index.d.ts:162](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L162) +[index.d.ts:163](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L163) --- @@ -172,7 +172,7 @@ #### Defined in -[index.d.ts:179](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L179) +[index.d.ts:180](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L180) --- @@ -192,7 +192,7 @@ #### Defined in -[index.d.ts:167](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L167) +[index.d.ts:168](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L168) --- @@ -212,7 +212,7 @@ #### Defined in -[index.d.ts:175](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L175) +[index.d.ts:176](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L176) --- @@ -222,9 +222,9 @@ #### Defined in -[index.d.ts:174](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L174) +[index.d.ts:175](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L175) -___ +--- ### readBatchTimeout @@ -232,7 +232,7 @@ ___ #### Defined in -[index.d.ts:161](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L161) +[index.d.ts:162](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L162) --- @@ -242,7 +242,7 @@ ___ #### Defined in -[index.d.ts:163](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L163) +[index.d.ts:164](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L164) --- @@ -252,7 +252,7 @@ ___ #### Defined in -[index.d.ts:170](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L170) +[index.d.ts:171](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L171) --- @@ -262,7 +262,7 @@ ___ #### Defined in -[index.d.ts:172](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L172) +[index.d.ts:173](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L173) --- @@ -272,7 +272,7 @@ ___ #### Defined in -[index.d.ts:180](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L180) +[index.d.ts:181](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L181) --- @@ -282,7 +282,7 @@ ___ #### Defined in -[index.d.ts:169](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L169) +[index.d.ts:170](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L170) --- @@ -292,7 +292,7 @@ ___ #### Defined in -[index.d.ts:173](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L173) +[index.d.ts:174](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L174) --- @@ -302,7 +302,7 @@ ___ #### Defined in -[index.d.ts:181](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L181) +[index.d.ts:182](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L182) --- @@ -322,4 +322,4 @@ ___ #### Defined in -[index.d.ts:168](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L168) +[index.d.ts:169](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L169) diff --git a/api-docs/docs/interfaces/ReplicaAssignment.md b/api-docs/docs/interfaces/ReplicaAssignment.md index 045cc0a..bf7cf05 100644 --- a/api-docs/docs/interfaces/ReplicaAssignment.md +++ b/api-docs/docs/interfaces/ReplicaAssignment.md @@ -15,7 +15,7 @@ #### Defined in -[index.d.ts:198](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L198) +[index.d.ts:199](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L199) --- @@ -25,4 +25,4 @@ #### Defined in -[index.d.ts:199](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L199) +[index.d.ts:200](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L200) diff --git a/api-docs/docs/interfaces/Schema.md b/api-docs/docs/interfaces/Schema.md index 0c00944..283fc34 100644 --- a/api-docs/docs/interfaces/Schema.md +++ b/api-docs/docs/interfaces/Schema.md @@ -16,7 +16,7 @@ #### Defined in -[index.d.ts:219](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L219) +[index.d.ts:220](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L220) --- @@ -26,7 +26,7 @@ #### Defined in -[index.d.ts:220](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L220) +[index.d.ts:221](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L221) --- @@ -36,4 +36,4 @@ #### Defined in -[index.d.ts:221](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L221) +[index.d.ts:222](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L222) diff --git a/api-docs/docs/interfaces/SubjectNameConfig.md b/api-docs/docs/interfaces/SubjectNameConfig.md index b1dc429..747fae8 100644 --- a/api-docs/docs/interfaces/SubjectNameConfig.md +++ b/api-docs/docs/interfaces/SubjectNameConfig.md @@ -17,7 +17,7 @@ #### Defined in -[index.d.ts:227](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L227) +[index.d.ts:228](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L228) --- @@ -27,7 +27,7 @@ #### Defined in -[index.d.ts:225](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L225) +[index.d.ts:226](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L226) --- @@ -37,7 +37,7 @@ #### Defined in -[index.d.ts:228](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L228) +[index.d.ts:229](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L229) --- @@ -47,4 +47,4 @@ #### Defined in -[index.d.ts:226](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L226) +[index.d.ts:227](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L227) diff --git a/api-docs/docs/interfaces/TopicConfig.md b/api-docs/docs/interfaces/TopicConfig.md index 30bc236..bcc81ed 100644 --- a/api-docs/docs/interfaces/TopicConfig.md +++ b/api-docs/docs/interfaces/TopicConfig.md @@ -18,7 +18,7 @@ #### Defined in -[index.d.ts:214](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L214) +[index.d.ts:215](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L215) --- @@ -28,7 +28,7 @@ #### 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) --- @@ -38,7 +38,7 @@ #### Defined in -[index.d.ts:213](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L213) +[index.d.ts:214](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L214) --- @@ -48,7 +48,7 @@ #### Defined in -[index.d.ts:212](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L212) +[index.d.ts:213](https://github.com/mostafa/xk6-kafka/blob/main/api-docs/index.d.ts#L213) --- @@ -58,4 +58,4 @@ #### 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) diff --git a/api-docs/index.d.ts b/api-docs/index.d.ts index ace824b..276daee 100644 --- a/api-docs/index.d.ts +++ b/api-docs/index.d.ts @@ -151,35 +151,35 @@ export interface ProduceConfig { /* Configuration for creating a Reader instance. */ export interface ReaderConfig { - brokers: string[]; - groupID: string; - groupTopics: string[]; - topic: string; - partition: number; - queueCapacity: number; - minBytes: number; - maxBytes: number; - readBatchTimeout: number; - maxWait: number; - readLagInterval: number; - groupBalancers: GROUP_BALANCERS[]; - heartbeatInterval: number; - commitInterval: number; - partitionWatchInterval: number; - watchPartitionChanges: boolean; - sessionTimeout: number; - rebalanceTimeout: number; - joinGroupBackoff: number; - retentionTime: number; - startOffset: number; - readBackoffMin: number; - readBackoffMax: number; - connectLogger: boolean; - maxAttempts: number; - isolationLevel: ISOLATION_LEVEL; - offset: number; - sasl: SASLConfig; - tls: TLSConfig; + brokers: string[]; + groupID: string; + groupTopics: string[]; + topic: string; + partition: number; + queueCapacity: number; + minBytes: number; + maxBytes: number; + readBatchTimeout: number; + maxWait: number; + readLagInterval: number; + groupBalancers: GROUP_BALANCERS[]; + heartbeatInterval: number; + commitInterval: number; + partitionWatchInterval: number; + watchPartitionChanges: boolean; + sessionTimeout: number; + rebalanceTimeout: number; + joinGroupBackoff: number; + retentionTime: number; + startOffset: number; + readBackoffMin: number; + readBackoffMax: number; + connectLogger: boolean; + maxAttempts: number; + isolationLevel: ISOLATION_LEVEL; + offset: number; + sasl: SASLConfig; + tls: TLSConfig; } /* Configuration for Consume method. */ From 430c1049de974b5f7de4b345ea86c01083b003d7 Mon Sep 17 00:00:00 2001 From: Mostafa Moradian Date: Thu, 5 Jan 2023 14:57:51 +0100 Subject: [PATCH 5/5] Add prettier to devDependencies to format the JS API docs after generating them --- api-docs/package.json | 3 ++- api-docs/yarn.lock | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/api-docs/package.json b/api-docs/package.json index eccfb6a..d86b916 100644 --- a/api-docs/package.json +++ b/api-docs/package.json @@ -7,9 +7,10 @@ "author": "Mostafa Moradian ", "license": "Apache-2.0", "scripts": { - "generate-docs": "yarn exec typedoc index.d.ts" + "generate-docs": "yarn exec typedoc index.d.ts && prettier -w ." }, "devDependencies": { + "prettier": "^2.8.1", "typedoc": "^0.22.17", "typedoc-plugin-markdown": "^3.12.1" }, diff --git a/api-docs/yarn.lock b/api-docs/yarn.lock index a75b590..d87a47d 100644 --- a/api-docs/yarn.lock +++ b/api-docs/yarn.lock @@ -94,6 +94,11 @@ once@^1.3.0: dependencies: wrappy "1" +prettier@^2.8.1: + version "2.8.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.1.tgz#4e1fd11c34e2421bc1da9aea9bd8127cd0a35efc" + integrity sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg== + shiki@^0.10.1: version "0.10.1" resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.10.1.tgz#6f9a16205a823b56c072d0f1a0bcd0f2646bef14"