/
funcSetTimeOnContainerPausedStateOnChaosScene.go
57 lines (55 loc) · 2.19 KB
/
funcSetTimeOnContainerPausedStateOnChaosScene.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
package iotmakerdockerbuilder
import "time"
// SetTimeOnContainerPausedStateOnChaosScene
//
// English:
//
// Sets the minimum and maximum times for the container pause
//
// Input:
// min: minimum time for container pause
// max: maximum time for container pause
//
// Note:
//
// * The following functions are used together during chaos testing:
// [optional] iotmakerdockerbuilder.ConfigChaosScene()
//
// Mandatory set:
// ContainerBuilder.EnableChaosScene()
// ContainerBuilder.SetTimeOnContainerUnpausedStateOnChaosScene()
// ContainerBuilder.SetTimeToStartChaosOnChaosScene()
// ContainerBuilder.SetTimeToRestartThisContainerAfterStopEventOnChaosScene()
// ContainerBuilder.SetTimeOnContainerPausedStateOnChaosScene()
// ContainerBuilder.SetTimeBeforeStartChaosInThisContainerOnChaosScene()
// ContainerBuilder.SetSceneNameOnChaosScene()
// [optional] ContainerBuilder.ContainerSetDisabePauseOnChaosScene()
// [optional] ContainerBuilder.ContainerSetDisabeStopOnChaosScene()
//
// Português:
//
// Define os tempos mínimos e máximos para a pausa do container
//
// Entrada:
// min: tempo mínimo para a pausa do container
// max: tempo máximo para a pausa do container
//
// Nota:
//
// * As funções a seguir são usadas em conjunto durante o teste de caos:
// [opcional] iotmakerdockerbuilder.ConfigChaosScene()
//
// Conjunto obrigatório:
// ContainerBuilder.EnableChaosScene()
// ContainerBuilder.SetTimeOnContainerUnpausedStateOnChaosScene()
// ContainerBuilder.SetTimeToStartChaosOnChaosScene()
// ContainerBuilder.SetTimeToRestartThisContainerAfterStopEventOnChaosScene()
// ContainerBuilder.SetTimeOnContainerPausedStateOnChaosScene()
// ContainerBuilder.SetTimeBeforeStartChaosInThisContainerOnChaosScene()
// ContainerBuilder.SetSceneNameOnChaosScene()
// [opcional] ContainerBuilder.ContainerSetDisabePauseOnChaosScene()
// [opcional] ContainerBuilder.ContainerSetDisabeStopOnChaosScene()
func (e *ContainerBuilder) SetTimeOnContainerPausedStateOnChaosScene(min, max time.Duration) {
e.chaos.minimumTimeToPause = min
e.chaos.maximumTimeToPause = max
}