tsdb/postgres: Support Unix socket for host (#25778)
* tsdb/postgres: Support Unix socket for host Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Fix host regex Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Fix host regex Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Remove panic Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Fix host parsing; add tests Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Add test Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Use strings.HasPrefix to detect Unix socket host Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Remove debug logging Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Escape single quotes and backslashes Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Test generateConnectionString as requested in review Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Add test case for SSL mode Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Showing
Please
register
or
sign in
to comment