package
Version:
v0.0.0-...-70d632b
Opens a new window with list of versions in this module.
Published: Aug 26, 2024
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func NewClient(cfg *Config) *redis.Client
NewClient создание клиента для подключения к redis.
type Config struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
Password string `yaml:"password"`
DB int `yaml:"db"`
}
Config конфигурация для Redis.
type Redis[T any] struct {
}
Redis реализация кеша с Redis.
func New[T any](client *redis.Client) *Redis[T]
New создает новый экземпляр Redis.
Delete удаляет значение из кеша.
Get возвращает значение из кеша.
Set добавляет значение в кеш.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.