rdb

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package rdb is the shared Redis connector: it parses a REDIS_URL into a go-redis client. Shipped into <project>/common/go/rdb on `maestro init` so any service that needs Redis (rate limiting, caching, locks) reaches for the same one-liner.

Open is intentionally lazy — it does NOT ping at construction. go-redis dials on first use, so a Redis blip at startup can't stop a service booting; callers that want the limiter/cache to degrade gracefully (the api-gateway does) rely on that. A service that genuinely cannot run without Redis should Ping the returned client itself and fail fast.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(url string) (*redis.Client, error)

Open parses url (redis://[:password@]host:port[/db], or rediss:// for TLS) and returns a client. It errors only on a malformed URL; a connection isn't attempted until the first command.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL