-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ca20be8
commit cbf3df7
Showing
15 changed files
with
213 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package iface | ||
|
||
import "github.com/xgzlucario/rotom/internal/resp" | ||
|
||
type Encoder interface { | ||
Encode(writer *resp.Writer) error | ||
Decode(reader *resp.Reader) error | ||
} | ||
|
||
type MapI interface { | ||
Encoder | ||
Set(key string, val []byte) bool | ||
Get(key string) ([]byte, bool) | ||
Remove(key string) bool | ||
Len() int | ||
Scan(fn func(key string, val []byte)) | ||
} | ||
|
||
type SetI interface { | ||
Encoder | ||
Add(key string) bool | ||
Exist(key string) bool | ||
Remove(key string) bool | ||
Pop() (key string, ok bool) | ||
Scan(fn func(key string)) | ||
Len() int | ||
} | ||
|
||
type ListI interface { | ||
Encoder | ||
} | ||
|
||
type ZSetI interface { | ||
Encoder | ||
Get(key string) (score float64, ok bool) | ||
Set(key string, score float64) bool | ||
Len() int | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package main | ||
package net | ||
|
||
import ( | ||
"golang.org/x/sys/unix" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package main | ||
package net | ||
|
||
import ( | ||
"fmt" | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.