Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisService ¶
func NewRedisService ¶
func NewRedisService(ctx context.Context, address, password string, db int) *RedisService
NewRedisService creates a new instance of RedisService with the specified connection options.
It establishes a connection to the Redis server located at the given address using the provided password and database index. The function will log a fatal error if the connection cannot be established.
Parameters:
ctx - Context for managing request-scoped values, cancelation signals, and deadlines. address - The address of the Redis server. password - The password for authenticating with the Redis server. db - The database index to select within the Redis server.
Returns:
A pointer to a newly created RedisService with an active Redis client.
Click to show internal directories.
Click to hide internal directories.