-
Notifications
You must be signed in to change notification settings - Fork 0
/
errors.go
25 lines (21 loc) · 904 Bytes
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package GoKeeper
import (
"errors"
)
// 定义 DataErr 类型作为 error 接口的别名
var (
ErrKeyIsEmpty = errors.New("the key is empty")
ErrIndexUpdateFailed = errors.New("failed to update")
ErrKeyNotFound = errors.New("key not found in database")
ErrDataFileNotFound = errors.New("data file not found")
ErrDataCountDeleted = errors.New("data has deleted")
ErrDataDirectoryCorrupted = errors.New("the database directory maybe corrupted")
ErrExceedMaxBatchNum = errors.New("exceed max batch num")
ErrDatabaseIsUsing = errors.New("database is using by another process")
)
// Merge Error
var (
ErrMergeIsRunning = errors.New("merge is running, try again later")
ErrMergeNotExceedThreshold = errors.New("the amount of data does not exceed the threshold")
ErrDiskSpaceNotEnough = errors.New("disk space is not enough")
)