Documentation
¶
Index ¶
Constants ¶
View Source
const (
DefaultPoolSize = 10
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Address string `json:"address"`
Password string `json:"password"`
PoolSize int `json:"pool_size"`
DB int `json:"db"`
UseTLS bool `json:"use_tls"`
}
func DefaultConfig ¶
func DefaultConfig() Config
type DeleteResult ¶
type ExistsResult ¶
type KeysResult ¶
type RedisClient ¶
type RedisClient struct {
// contains filtered or unexported fields
}
func NewRedisClient ¶
func NewRedisClient(logger *slog.Logger, cfg Config) (*RedisClient, error)
func (*RedisClient) CallTool ¶
func (c *RedisClient) CallTool(ctx context.Context, name string, args json.RawMessage) (interface{}, error)
func (*RedisClient) Close ¶
func (c *RedisClient) Close()
func (*RedisClient) GetTools ¶
func (c *RedisClient) GetTools() []ToolDefinition
type ToolDefinition ¶
type ToolDefinition struct {
Name string `json:"name"`
Description string `json:"description"`
InputSchema json.RawMessage `json:"inputSchema"`
}
type ToolHandler ¶
type ToolHandler func(ctx context.Context, args json.RawMessage) (interface{}, error)
Click to show internal directories.
Click to hide internal directories.