1
0
Fork 0
forgejo/modules/queue
Gusted 9df10c5ac5
[FEAT] Only implement used API of Redis client
- Currently for the `nosql` module (which simply said provides a manager
for redis clients) returns the
[`redis.UniversalClient`](https://pkg.go.dev/github.com/redis/go-redis/v9#UniversalClient)
interface. The interfaces exposes all available commands.
- In generalm, dead code elimination should be able to take care of not
generating the machine code for methods that aren't being used. However
in this specific case, dead code elimination either is disabled or gives
up on trying because of exhaustive call stack the client by
`GetRedisClient` is used.
- Help the Go compiler by explicitly specifying which methods we use.
This reduces the binary size by ~400KB (397312 bytes). As Go no longer
generate machine code for commands that aren't being used.
- There's a **CAVEAT** with this, if a developer wants to use a new
method that isn't specified, they will have to know about this
hack (by following the definition of existing Redis methods) and add the
method definition from the Redis library to the `RedisClient` interface.
2024-08-30 04:33:15 +02:00
..
lqinternal Help to recover from corrupted levelqueue (#24912) 2023-05-29 10:52:32 +08:00
mock [CHORE] Move to new sessioner library 2024-08-25 03:47:08 +02:00
backoff.go Rewrite queue (#24505) 2023-05-08 19:49:59 +08:00
base.go Rewrite queue (#24505) 2023-05-08 19:49:59 +08:00
base_channel.go Fix linting issues 2024-08-18 16:25:13 +02:00
base_channel_test.go Rewrite queue (#24505) 2023-05-08 19:49:59 +08:00
base_dummy.go Rewrite queue (#24505) 2023-05-08 19:49:59 +08:00
base_levelqueue.go Help to recover from corrupted levelqueue (#24912) 2023-05-29 10:52:32 +08:00
base_levelqueue_common.go Help to recover from corrupted levelqueue (#24912) 2023-05-29 10:52:32 +08:00
base_levelqueue_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
base_levelqueue_unique.go Help to recover from corrupted levelqueue (#24912) 2023-05-29 10:52:32 +08:00
base_redis.go [FEAT] Only implement used API of Redis client 2024-08-30 04:33:15 +02:00
base_redis_test.go refactor: redis queue backend test cleanup 2024-05-21 18:02:33 +02:00
base_redis_with_server_test.go lint: fix import order issue 2024-05-21 18:02:37 +02:00
base_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
config.go Rewrite queue (#24505) 2023-05-08 19:49:59 +08:00
manager.go Improve queue and logger context (#24924) 2023-05-26 07:31:55 +00:00
manager_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
queue.go Add codespell support and fix a good number of typos with its help (#3270) 2024-05-09 13:49:37 +00:00
testhelper.go Rewrite queue (#24505) 2023-05-08 19:49:59 +08:00
workergroup.go workergroup: gracefully exit on close(popItemErr) 2024-03-24 07:12:31 +01:00
workerqueue.go refactor: redis queue backend test cleanup 2024-05-21 18:02:33 +02:00
workerqueue_test.go Fix linting issues 2024-08-18 16:25:13 +02:00