-
Notifications
You must be signed in to change notification settings - Fork 1
/
typeChaos.go
54 lines (51 loc) · 1.52 KB
/
typeChaos.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
package iotmakerdockerbuilder
import "time"
// chaos
//
// English:
//
// Object chaos manager
//
// Português:
//
// Objeto gerenciador de caos
type chaos struct {
foundSuccess bool
foundFail bool
filterToStart []LogFilter
filterRestart []LogFilter
filterSuccess []LogFilter
filterFail []LogFilter
filterMonitor []LogFilter
filterLog []LogFilter
sceneName string
logPath string
serviceStartedAt time.Time
minimumTimeBeforeRestart time.Duration
maximumTimeBeforeRestart time.Duration
minimumTimeToStartChaos time.Duration
maximumTimeToStartChaos time.Duration
minimumTimeToPause time.Duration
maximumTimeToPause time.Duration
minimumTimeToUnpause time.Duration
maximumTimeToUnpause time.Duration
minimumTimeToRestart time.Duration
maximumTimeToRestart time.Duration
restartProbability float64
restartChangeIpProbability float64
restartLimit int
enableChaos bool
event chan Event
monitorStop chan struct{}
monitorRunning bool
//containerStarted bool
containerPaused bool
containerStopped bool
linear bool
chaosStarted bool
chaosCanRestartContainer bool
//chaosCanRestartEnd bool
eventNext time.Time
disableStopContainer bool
disablePauseContainer bool
}