redis.go | |
---|---|
Copyright 2023 Red Hat, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |
|
Package redis contains shared functionality related to Redis |
|
Client is an implementation of the Redis client for Redis server |
|
CreateRedisClient creates a Redis V9 client, it has explicit checks for config params because the go-redis package lets us create a client with incorrect params so errors are only found during subsequent command executions |
|
DB is configurable in case we want to change data structure |
|
HealthCheck executes PING command to check for liveness status of Redis server |
|
.Result() gets value and error of executed command at once |
|