redis

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: May 28, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package redis provides a Redis-based storage implementation for the Agent Master Engine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

Storage implements the engine.Storage interface using Redis

func New

func New(client *redis.Client, prefix string) *Storage

New creates a new Redis-based storage

func (*Storage) Close

func (s *Storage) Close() error

Close closes the Redis connection

func (*Storage) Delete

func (s *Storage) Delete(key string) error

Delete removes data from Redis

func (*Storage) List

func (s *Storage) List(prefix string) ([]string, error)

List lists keys with given prefix

func (*Storage) Read

func (s *Storage) Read(key string) ([]byte, error)

Read reads data from Redis

func (*Storage) Watch

func (s *Storage) Watch(key string, handler func([]byte)) (func(), error)

Watch watches for changes to a key

func (*Storage) Write

func (s *Storage) Write(key string, data []byte) error

Write writes data to Redis

Jump to

Keyboard shortcuts

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