Skip to content

Commit 30e3a12

Browse files
committed
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]>
1 parent 9e1c334 commit 30e3a12

File tree

1 file changed

+22
-23
lines changed

1 file changed

+22
-23
lines changed

README.md

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,34 @@
44
[![Run Tests](https://github.com/golang-queue/queue/actions/workflows/go.yml/badge.svg)](https://github.com/golang-queue/queue/actions/workflows/go.yml)
55
[![codecov](https://codecov.io/gh/golang-queue/queue/branch/master/graph/badge.svg?token=SSo3mHejOE)](https://codecov.io/gh/golang-queue/queue)
66

7-
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.
88

99
## Features
1010

11-
- [x] Support [buffered channel](https://gobyexample.com/channel-buffering) queue.
12-
- [x] Support [NSQ](https://nsq.io/) (A realtime distributed messaging platform) as backend.
13-
- [x] Support [NATS](https://nats.io/) (Connective Technology for Adaptive Edge & Distributed Systems) as backend.
14-
- [x] Support [Redis Pub/Sub](https://redis.io/docs/manual/pubsub/) as backend.
15-
- [x] Support [Redis Streams](https://redis.io/docs/manual/data-types/streams/) as backend.
16-
- [x] Support [RabbitMQ](https://www.rabbitmq.com/) as backend.
11+
- [x] Supports [buffered channel](https://gobyexample.com/channel-buffering) queues.
12+
- [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.
1717

1818
## Queue Scenario
1919

20-
Simple Queue service using Ring Buffer as default backend.
20+
A simple queue service using a ring buffer as the default backend.
2121

2222
![queue01](./images/flow-01.svg)
2323

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

2626
![queue02](./images/flow-02.svg)
2727

28-
Multiple Producer and Consumer.
28+
Supports multiple producers and consumers.
2929

3030
![queue03](./images/flow-03.svg)
3131

3232
## Requirements
3333

34-
Go version **1.18** above
34+
Go version **1.22** or above
3535

3636
## Installation
3737

@@ -41,17 +41,17 @@ Install the stable version:
4141
go get github.com/golang-queue/queue
4242
```
4343

44-
Install the latest verison:
44+
Install the latest version:
4545

4646
```sh
4747
go get github.com/golang-queue/queue@master
4848
```
4949

5050
## Usage
5151

52-
### Basic usage of Pool (use Task function)
52+
### Basic Usage of Pool (using the Task function)
5353

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.
5555

5656
```go
5757
package main
@@ -94,10 +94,9 @@ func main() {
9494
}
9595
```
9696

97-
### Basic usage of Pool (use message queue)
97+
### Basic Usage of Pool (using a message queue)
9898

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.
101100

102101
```go
103102
package main
@@ -166,9 +165,9 @@ func main() {
166165
}
167166
```
168167

169-
## Using NSQ as Queue
168+
## Using NSQ as a Queue
170169

171-
See the [NSQ documentation](https://github.com/golang-queue/nsq).
170+
Refer to the [NSQ documentation](https://github.com/golang-queue/nsq).
172171

173172
```go
174173
package main
@@ -247,9 +246,9 @@ func main() {
247246
}
248247
```
249248

250-
## Using NATs as Queue
249+
## Using NATS as a Queue
251250

252-
See the [NATs documentation](https://github.com/golang-queue/nats)
251+
Refer to the [NATS documentation](https://github.com/golang-queue/nats).
253252

254253
```go
255254
package main
@@ -332,9 +331,9 @@ func main() {
332331
}
333332
```
334333

335-
## Using Redis(Pub/Sub) as Queue
334+
## Using Redis (Pub/Sub) as a Queue
336335

337-
See the [redis documentation](https://github.com/golang-queue/redisdb)
336+
Refer to the [Redis documentation](https://github.com/golang-queue/redisdb).
338337

339338
```go
340339
package main

0 commit comments

Comments
 (0)