Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("key not found")
ErrNotFound is returned when a key is not found in the storage.
Functions ¶
This section is empty.
Types ¶
type MemoryPubSub ¶
type MemoryPubSub struct {
// contains filtered or unexported fields
}
MemoryPubSub provides an in-memory implementation of the PubSub interface. It is intended for single-process environments where external infrastructure is not needed.
func NewMemoryPubSub ¶
func NewMemoryPubSub() *MemoryPubSub
NewMemoryPubSub creates a new in-memory PubSub system.
type MemoryStorage ¶
type MemoryStorage struct {
// contains filtered or unexported fields
}
MemoryStorage provides an in-memory implementation of the Storage interface.
func NewMemoryStorage ¶
func NewMemoryStorage() *MemoryStorage
NewMemoryStorage creates a new in-memory storage.
func (*MemoryStorage) Close ¶ added in v0.1.13
func (s *MemoryStorage) Close() error
Close explicitly stops the background pruning loop to prevent goroutine leaks.
func (*MemoryStorage) Delete ¶
func (s *MemoryStorage) Delete(key string) error
Delete removes a value from the in-memory store.
Click to show internal directories.
Click to hide internal directories.