This commit is contained in:
bel
2024-04-11 23:01:40 -06:00
parent def095e0e8
commit ea902cef86
7 changed files with 98 additions and 17 deletions

View File

@@ -6,13 +6,6 @@ type Storage struct {
driver Driver
}
type Driver interface {
Close() error
ForEach(context.Context, func(string, []byte) error) error
Get(context.Context, string) ([]byte, error)
Set(context.Context, string, []byte) error
}
func NewTestStorage() Storage {
return Storage{driver: NewTestDB()}
}
@@ -20,3 +13,9 @@ func NewTestStorage() Storage {
func NewStorage(driver Driver) Storage {
return Storage{driver: driver}
}
func (s Storage) Enqueue(ctx context.Context, m Message) error {
}
func (s Storage) Dequeue(ctx context.Context, m Message) error {
}