NAME

Async::Redis::URI - Redis connection URI parser

SYNOPSIS

use Async::Redis::URI;

my $uri = Async::Redis::URI->parse('redis://localhost:6379/0');

say $uri->host;      # localhost
say $uri->port;      # 6379
say $uri->database;  # 0

# Use with constructor
my $redis = Async::Redis->new($uri->to_hash);

DESCRIPTION

Parses Redis connection URIs in standard formats:

redis://host:port/database
redis://:password@host
redis://user:password@host
rediss://host              (TLS)
redis+unix:///path/to/socket?db=N

METHODS

parse($uri_string)

Class method. Parses URI string and returns URI object. Returns undef for empty/undef input. Dies on invalid URI.

to_hash

Returns hash suitable for passing to Async::Redis->new().

Accessors

scheme, host, port, path, database, username, password, tls, is_unix