redis

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisConfig

type RedisConfig struct {
	Host     string `toml:"host"`
	Port     int    `toml:"port"`
	Password string `toml:"password"`
	DB       int    `toml:"db"`
	PoolSize int    `toml:"pool_size"`
}

type RedisPlugin

type RedisPlugin struct {
	gorgo.BasePlugin
	// contains filtered or unexported fields
}

func NewRedisPlugin

func NewRedisPlugin() *RedisPlugin

func (*RedisPlugin) CanHotReload

func (p *RedisPlugin) CanHotReload() bool

HotReloadable implementation

func (*RedisPlugin) Delete

func (p *RedisPlugin) Delete(key string) error

func (*RedisPlugin) Get

func (p *RedisPlugin) Get(key string) (string, error)

func (*RedisPlugin) GetClient

func (p *RedisPlugin) GetClient() *redis.Client

Additional methods

func (*RedisPlugin) GetDefaultConfig

func (p *RedisPlugin) GetDefaultConfig() map[string]interface{}

func (*RedisPlugin) GetEventSubscriptions

func (p *RedisPlugin) GetEventSubscriptions() map[string]gorgo.EventHandler

EventSubscriber implementation

func (*RedisPlugin) GetMiddleware

func (p *RedisPlugin) GetMiddleware() []gorgo.MiddlewareFunc

MiddlewareProvider implementation

func (*RedisPlugin) GetServices

func (p *RedisPlugin) GetServices() map[string]interface{}

ServiceProvider implementation

func (*RedisPlugin) Initialize

func (p *RedisPlugin) Initialize(container *container.Container, config map[string]interface{}) error

Main plugin methods

func (*RedisPlugin) OnHotReload

func (p *RedisPlugin) OnHotReload(newConfig map[string]interface{}) error

func (*RedisPlugin) SessionMiddleware

func (p *RedisPlugin) SessionMiddleware(sessionName string) gorgo.MiddlewareFunc

Session middleware

func (*RedisPlugin) Set

func (p *RedisPlugin) Set(key string, value interface{}, expiration time.Duration) error

func (*RedisPlugin) Start

func (p *RedisPlugin) Start(ctx context.Context) error

func (*RedisPlugin) Stop

func (p *RedisPlugin) Stop(ctx context.Context) error

func (*RedisPlugin) ValidateConfig

func (p *RedisPlugin) ValidateConfig(config map[string]interface{}) error

ConfigurablePlugin implementation

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL