-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathactions.go
83 lines (67 loc) · 2.78 KB
/
actions.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package storage_lock
// 通用的事件
const (
ActionLockNotFoundError = "lock-not-found-error"
ActionNotLockOwner = "not-lock-owner"
ActionGetLockInformationError = "get-lock-information-error"
ActionTimeout = "timeout"
ActionSleepRetry = "sleep-retry"
ActionSleep = "Sleep"
ActionGetLeaseExpireTimeError = "getLeaseExpireTime-error"
)
// 获取锁相关的事件
const (
ActionLockBegin = "StorageLock.Lock.Begin"
ActionLockFinish = "StorageLock.Lock.Finish"
ActionLockSuccess = "StorageLock.Lock.Begin.Success"
ActionLockError = "StorageLock.Lock.Begin.Error"
ActionTryLockBegin = "StorageLock.Lock.Try.Begin"
ActionLockExists = "StorageLock.Lock.Exists"
ActionLockNotExists = "StorageLock.Lock.NotExists"
ActionLockReleased = "StorageLock.Lock.Released"
ActionLockExpired = "StorageLock.Lock.Expired"
ActionLockReentry = "StorageLock.Lock.Reentry"
ActionLockBusy = "StorageLock.Lock.Begin.Busy"
ActionLockVersionMiss = "StorageLock.Lock.VersionMiss"
ActionLockRollback = "StorageLock.Lock.Rollback"
ActionLockRollbackSuccess = "StorageLock.Lock.Rollback.Success"
ActionLockRollbackError = "StorageLock.Lock.Rollback.Error"
)
// 释放锁相关的事件
const (
ActionUnlock = "StorageLock.Unlock"
ActionUnlockFinish = "StorageLock.Unlock.Finish"
ActionUnlockSuccess = "StorageLock.Unlock.Success"
ActionUnlockError = "StorageLock.Unlock.Error"
ActionUnlockRelease = "StorageLock.Unlock.Release"
ActionUnlockReentry = "StorageLock.Unlock.Reentry"
ActionUnlockVersionMiss = "StorageLock.Unlock.VersionMiss"
)
// 看门狗相关的事件
const (
ActionWatchDogRefresh = "WatchDog.Refresh"
ActionWatchDogRefreshBegin = "WatchDog.Refresh.Begin"
ActionWatchDogRefreshSuccess = "WatchDog.Refresh.Success"
ActionWatchDogRefreshError = "WatchDog.Refresh.Error"
ActionWatchDogCreate = "WatchDog.Create"
ActionWatchDogCreateSuccess = "WatchDog.Create.Success"
ActionWatchDogCreateError = "WatchDog.Create.Error"
ActionWatchDogStart = "WatchDog.Start"
ActionWatchDogStartSuccess = "WatchDog.Start.Success"
ActionWatchDogStartError = "WatchDog.Start.Error"
ActionWatchDogStop = "WatchDog.Stop"
ActionWatchDogStopSuccess = "WatchDog.Stop.success"
ActionWatchDogStopError = "WatchDog.Stop.error"
ActionWatchDogExit = "WatchDog.Exit"
//ActionWatchDogExitByTooManyError = "WatchDog.Exit.TooManyError"
ActionWatchDogSetEvent = "WatchDog.SetEvent"
)
// Payload的名字
const (
PayloadLastVersion = "lastVersion"
PayloadVersionMissCount = "versionMissCount"
PayloadLockBusyCount = "lockBusyCount"
PayloadSleep = "sleep"
PayloadRefreshSuccessCount = "refreshSuccessCount"
PayloadContinueErrorCount = "continueErrorCount"
)