/
fake_event_recorder.go
84 lines (75 loc) · 2.74 KB
/
fake_event_recorder.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
84
// Code generated by counterfeiter. DO NOT EDIT.
package controllerfakes
import (
"sync"
"k8s.io/apimachinery/pkg/runtime"
)
type FakeEventRecorder struct {
AnnotatedEventfStub func(runtime.Object, map[string]string, string, string, string, ...interface{})
annotatedEventfMutex sync.RWMutex
annotatedEventfArgsForCall []struct {
arg1 runtime.Object
arg2 map[string]string
arg3 string
arg4 string
arg5 string
arg6 []interface{}
}
invocations map[string][][]interface{}
invocationsMutex sync.RWMutex
}
func (fake *FakeEventRecorder) AnnotatedEventf(arg1 runtime.Object, arg2 map[string]string, arg3 string, arg4 string, arg5 string, arg6 ...interface{}) {
fake.annotatedEventfMutex.Lock()
fake.annotatedEventfArgsForCall = append(fake.annotatedEventfArgsForCall, struct {
arg1 runtime.Object
arg2 map[string]string
arg3 string
arg4 string
arg5 string
arg6 []interface{}
}{arg1, arg2, arg3, arg4, arg5, arg6})
stub := fake.AnnotatedEventfStub
fake.recordInvocation("AnnotatedEventf", []interface{}{arg1, arg2, arg3, arg4, arg5, arg6})
fake.annotatedEventfMutex.Unlock()
if stub != nil {
fake.AnnotatedEventfStub(arg1, arg2, arg3, arg4, arg5, arg6...)
}
}
func (fake *FakeEventRecorder) AnnotatedEventfCallCount() int {
fake.annotatedEventfMutex.RLock()
defer fake.annotatedEventfMutex.RUnlock()
return len(fake.annotatedEventfArgsForCall)
}
func (fake *FakeEventRecorder) AnnotatedEventfCalls(stub func(runtime.Object, map[string]string, string, string, string, ...interface{})) {
fake.annotatedEventfMutex.Lock()
defer fake.annotatedEventfMutex.Unlock()
fake.AnnotatedEventfStub = stub
}
func (fake *FakeEventRecorder) AnnotatedEventfArgsForCall(i int) (runtime.Object, map[string]string, string, string, string, []interface{}) {
fake.annotatedEventfMutex.RLock()
defer fake.annotatedEventfMutex.RUnlock()
argsForCall := fake.annotatedEventfArgsForCall[i]
return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4, argsForCall.arg5, argsForCall.arg6
}
func (fake *FakeEventRecorder) Invocations() map[string][][]interface{} {
fake.invocationsMutex.RLock()
defer fake.invocationsMutex.RUnlock()
fake.annotatedEventfMutex.RLock()
defer fake.annotatedEventfMutex.RUnlock()
copiedInvocations := map[string][][]interface{}{}
for key, value := range fake.invocations {
copiedInvocations[key] = value
}
return copiedInvocations
}
func (fake *FakeEventRecorder) recordInvocation(key string, args []interface{}) {
fake.invocationsMutex.Lock()
defer fake.invocationsMutex.Unlock()
if fake.invocations == nil {
fake.invocations = map[string][][]interface{}{}
}
if fake.invocations[key] == nil {
fake.invocations[key] = [][]interface{}{}
}
fake.invocations[key] = append(fake.invocations[key], args)
}