-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
6 changed files
with
97 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* @Author: JameyWoo | ||
* @Email: 2622075127wjh@gmail.com | ||
* @Date: 2021/1/21 | ||
* @Desc: 保存一些全局的常量, 后续改为配置 | ||
* @Copyright (c) 2020, JameyWoo. All rights reserved. | ||
*/ | ||
|
||
package TinyBase | ||
|
||
const ( | ||
// memStore所占内存的阈值, 如果到达了该阈值则将其持久化. 暂定 1024B = 1KB | ||
maxMemSize int = 1 << 15 | ||
deleted string = "__deleted__" | ||
) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* @Author: JameyWoo | ||
* @Email: 2622075127wjh@gmail.com | ||
* @Date: 2021/1/21 | ||
* @Desc: 定义一些错误 | ||
* @Copyright (c) 2020, JameyWoo. All rights reserved. | ||
*/ | ||
|
||
package TinyBase | ||
|
||
import "errors" | ||
|
||
var GetEmptyError error | ||
|
||
func init() { | ||
GetEmptyError = errors.New("GetEmptyError: no such element") | ||
} |
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