You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: improve documentation clarity and update Go version requirement
- Update the description of the Goroutine pool to clarify CPU capacity
- Correct grammatical errors and improve readability in feature list
- Update Go version requirement to 1.22 or above
- Fix a typo in the word "version"
- Improve clarity and consistency in usage instructions and examples
- Change "NSQ documentation" and similar references to "Refer to the [service] documentation" for consistency
Signed-off-by: appleboy <[email protected]>
Queue is a Golang library for spawning and managing a Goroutine pool, allowing you to create multiple workers according to the limited CPU number of machines.
7
+
Queue is a Golang library for spawning and managing a Goroutine pool, allowing you to create multiple workers based on the limited CPU capacity of the machine.
-[x]Supports[NSQ](https://nsq.io/) (a real-time distributed messaging platform) as a backend.
13
+
-[x]Supports[NATS](https://nats.io/) (connective technology for adaptive edge and distributed systems) as a backend.
14
+
-[x]Supports[Redis Pub/Sub](https://redis.io/docs/manual/pubsub/) as a backend.
15
+
-[x]Supports[Redis Streams](https://redis.io/docs/manual/data-types/streams/) as a backend.
16
+
-[x]Supports[RabbitMQ](https://www.rabbitmq.com/) as a backend.
17
17
18
18
## Queue Scenario
19
19
20
-
Simple Queue service using Ring Buffer as default backend.
20
+
A simple queue service using a ring buffer as the default backend.
21
21
22
22

23
23
24
-
Change Queue service like NSQ, NATs or Redis.
24
+
Easily switch the queue service to use NSQ, NATS, or Redis.
25
25
26
26

27
27
28
-
Multiple Producer and Consumer.
28
+
Supports multiple producers and consumers.
29
29
30
30

31
31
32
32
## Requirements
33
33
34
-
Go version **1.18** above
34
+
Go version **1.22** or above
35
35
36
36
## Installation
37
37
@@ -41,17 +41,17 @@ Install the stable version:
41
41
go get github.com/golang-queue/queue
42
42
```
43
43
44
-
Install the latest verison:
44
+
Install the latest version:
45
45
46
46
```sh
47
47
go get github.com/golang-queue/queue@master
48
48
```
49
49
50
50
## Usage
51
51
52
-
### Basic usage of Pool (use Task function)
52
+
### Basic Usage of Pool (using the Task function)
53
53
54
-
By calling `QueueTask()` method, it schedules the task executed by worker (goroutines) in the Pool.
54
+
By calling the `QueueTask()` method, tasks are scheduled to be executed by workers (goroutines) in the pool.
55
55
56
56
```go
57
57
package main
@@ -94,10 +94,9 @@ func main() {
94
94
}
95
95
```
96
96
97
-
### Basic usage of Pool (use message queue)
97
+
### Basic Usage of Pool (using a message queue)
98
98
99
-
Define the new message struct and implement the `Bytes()` func to encode message. Give the `WithFn` func
100
-
to handle the message from Queue.
99
+
Define a new message struct and implement the `Bytes()` function to encode the message. Use the `WithFn` function to handle the message from the queue.
101
100
102
101
```go
103
102
package main
@@ -166,9 +165,9 @@ func main() {
166
165
}
167
166
```
168
167
169
-
## Using NSQ as Queue
168
+
## Using NSQ as a Queue
170
169
171
-
See the [NSQ documentation](https://github.com/golang-queue/nsq).
170
+
Refer to the [NSQ documentation](https://github.com/golang-queue/nsq).
172
171
173
172
```go
174
173
package main
@@ -247,9 +246,9 @@ func main() {
247
246
}
248
247
```
249
248
250
-
## Using NATs as Queue
249
+
## Using NATS as a Queue
251
250
252
-
See the [NATs documentation](https://github.com/golang-queue/nats)
251
+
Refer to the [NATS documentation](https://github.com/golang-queue/nats).
253
252
254
253
```go
255
254
package main
@@ -332,9 +331,9 @@ func main() {
332
331
}
333
332
```
334
333
335
-
## Using Redis(Pub/Sub) as Queue
334
+
## Using Redis(Pub/Sub) as a Queue
336
335
337
-
See the [redis documentation](https://github.com/golang-queue/redisdb)
336
+
Refer to the [Redis documentation](https://github.com/golang-queue/redisdb).
0 commit comments