[PR #240] [CLOSED] support redis sentinel config#added #634

Closed
opened 2026-03-07 22:16:32 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hibiken/asynqmon/pull/240
Author: @linhbkhn95
Created: 5/3/2022
Status: Closed

Base: masterHead: master


📝 Commits (1)

  • ed7766d support redis sentinel config

📊 Changes

3 files changed (+31 additions, -22 deletions)

View changed files

📝 Makefile (+1 -1)
📝 README.md (+12 -7)
📝 cmd/asynqmon/main.go (+18 -14)

📄 Description

Background
Currently, Redis v8 doesn't support passing Redis sentinels via URL as I know from their code.

func ParseURL(redisURL string) (*Options, error) {
	u, err := url.Parse(redisURL)
	if err != nil {
		return nil, err
	}

	switch u.Scheme {
	case "redis", "rediss":
		return setupTCPConn(u)
	case "unix":
		return setupUnixConn(u)
	default:
		return nil, fmt.Errorf("redis: invalid URL scheme: %s", u.Scheme)
	}
}

So, As the author @hibiken mentioned in https://github.com/hibiken/asynqmon/issues/235 will not perform for Redis sentinels, terminal will show an error as Redis v8 defined redis: invalid URL scheme redis+sentinel

Why did we need it?

  • Support pass Redis sentinel config via passing redis-master-name and redis-addrs to flag or REDIS_MASTER_NAME and REDIS_ADDS to environment
  • Refactor flag that we will flag redis-addrs to detect users who want to use Redis standalone or clusters when do not pass redis-master-name, otherwise it will be redis sentinels. So we can deprecate redis-addr and redis-cluster-nodes flag

#fixed https://github.com/hibiken/asynqmon/issues/235


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hibiken/asynqmon/pull/240 **Author:** [@linhbkhn95](https://github.com/linhbkhn95) **Created:** 5/3/2022 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`ed7766d`](https://github.com/hibiken/asynqmon/commit/ed7766df090ca182ce1b12d3d8c8a09bb2fb6a02) support redis sentinel config ### 📊 Changes **3 files changed** (+31 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `Makefile` (+1 -1) 📝 `README.md` (+12 -7) 📝 `cmd/asynqmon/main.go` (+18 -14) </details> ### 📄 Description **Background** Currently, Redis v8 doesn't support passing Redis sentinels via URL as I know from their code. ``` func ParseURL(redisURL string) (*Options, error) { u, err := url.Parse(redisURL) if err != nil { return nil, err } switch u.Scheme { case "redis", "rediss": return setupTCPConn(u) case "unix": return setupUnixConn(u) default: return nil, fmt.Errorf("redis: invalid URL scheme: %s", u.Scheme) } } ``` So, As the author @hibiken mentioned in https://github.com/hibiken/asynqmon/issues/235 will not perform for Redis sentinels, terminal will show an error as Redis v8 defined `redis: invalid URL scheme redis+sentinel` **Why did we need it?** - Support pass Redis sentinel config via passing `redis-master-name` and `redis-addrs` to flag or `REDIS_MASTER_NAME` and `REDIS_ADDS` to environment - Refactor flag that we will flag `redis-addrs` to detect users who want to use Redis standalone or clusters when do not pass `redis-master-name`, otherwise it will be redis sentinels. So we can deprecate `redis-addr` and `redis-cluster-nodes` flag #fixed https://github.com/hibiken/asynqmon/issues/235 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-07 22:16:32 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asynqmon#634
No description provided.