|
|
@@ -1,16 +1,179 @@
|
|
|
+// Code generated by counterfeiter. DO NOT EDIT.
|
|
|
package fakes
|
|
|
|
|
|
-import "k8s.io/apimachinery/pkg/runtime"
|
|
|
+import (
|
|
|
+ "sync"
|
|
|
|
|
|
-type FakeRecorder struct {
|
|
|
- EventCallCounter int
|
|
|
+ "k8s.io/apimachinery/pkg/runtime"
|
|
|
+ "k8s.io/client-go/tools/record"
|
|
|
+)
|
|
|
+
|
|
|
+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{}
|
|
|
+ }
|
|
|
+ EventStub func(runtime.Object, string, string, string)
|
|
|
+ eventMutex sync.RWMutex
|
|
|
+ eventArgsForCall []struct {
|
|
|
+ arg1 runtime.Object
|
|
|
+ arg2 string
|
|
|
+ arg3 string
|
|
|
+ arg4 string
|
|
|
+ }
|
|
|
+ EventfStub func(runtime.Object, string, string, string, ...interface{})
|
|
|
+ eventfMutex sync.RWMutex
|
|
|
+ eventfArgsForCall []struct {
|
|
|
+ arg1 runtime.Object
|
|
|
+ arg2 string
|
|
|
+ arg3 string
|
|
|
+ arg4 string
|
|
|
+ arg5 []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) Event(arg1 runtime.Object, arg2 string, arg3 string, arg4 string) {
|
|
|
+ fake.eventMutex.Lock()
|
|
|
+ fake.eventArgsForCall = append(fake.eventArgsForCall, struct {
|
|
|
+ arg1 runtime.Object
|
|
|
+ arg2 string
|
|
|
+ arg3 string
|
|
|
+ arg4 string
|
|
|
+ }{arg1, arg2, arg3, arg4})
|
|
|
+ stub := fake.EventStub
|
|
|
+ fake.recordInvocation("Event", []interface{}{arg1, arg2, arg3, arg4})
|
|
|
+ fake.eventMutex.Unlock()
|
|
|
+ if stub != nil {
|
|
|
+ fake.EventStub(arg1, arg2, arg3, arg4)
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+func (fake *FakeEventRecorder) EventCallCount() int {
|
|
|
+ fake.eventMutex.RLock()
|
|
|
+ defer fake.eventMutex.RUnlock()
|
|
|
+ return len(fake.eventArgsForCall)
|
|
|
}
|
|
|
|
|
|
-func (r *FakeRecorder) Event(object runtime.Object, eventtype string, reason string, message string) {
|
|
|
- r.EventCallCounter += 1
|
|
|
+func (fake *FakeEventRecorder) EventCalls(stub func(runtime.Object, string, string, string)) {
|
|
|
+ fake.eventMutex.Lock()
|
|
|
+ defer fake.eventMutex.Unlock()
|
|
|
+ fake.EventStub = stub
|
|
|
}
|
|
|
-func (r FakeRecorder) EventCallCount() int { return r.EventCallCounter }
|
|
|
-func (r FakeRecorder) Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{}) {
|
|
|
+
|
|
|
+func (fake *FakeEventRecorder) EventArgsForCall(i int) (runtime.Object, string, string, string) {
|
|
|
+ fake.eventMutex.RLock()
|
|
|
+ defer fake.eventMutex.RUnlock()
|
|
|
+ argsForCall := fake.eventArgsForCall[i]
|
|
|
+ return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4
|
|
|
+}
|
|
|
+
|
|
|
+func (fake *FakeEventRecorder) Eventf(arg1 runtime.Object, arg2 string, arg3 string, arg4 string, arg5 ...interface{}) {
|
|
|
+ fake.eventfMutex.Lock()
|
|
|
+ fake.eventfArgsForCall = append(fake.eventfArgsForCall, struct {
|
|
|
+ arg1 runtime.Object
|
|
|
+ arg2 string
|
|
|
+ arg3 string
|
|
|
+ arg4 string
|
|
|
+ arg5 []interface{}
|
|
|
+ }{arg1, arg2, arg3, arg4, arg5})
|
|
|
+ stub := fake.EventfStub
|
|
|
+ fake.recordInvocation("Eventf", []interface{}{arg1, arg2, arg3, arg4, arg5})
|
|
|
+ fake.eventfMutex.Unlock()
|
|
|
+ if stub != nil {
|
|
|
+ fake.EventfStub(arg1, arg2, arg3, arg4, arg5...)
|
|
|
+ }
|
|
|
}
|
|
|
-func (r FakeRecorder) AnnotatedEventf(object runtime.Object, annotations map[string]string, eventtype, reason, messageFmt string, args ...interface{}) {
|
|
|
+
|
|
|
+func (fake *FakeEventRecorder) EventfCallCount() int {
|
|
|
+ fake.eventfMutex.RLock()
|
|
|
+ defer fake.eventfMutex.RUnlock()
|
|
|
+ return len(fake.eventfArgsForCall)
|
|
|
}
|
|
|
+
|
|
|
+func (fake *FakeEventRecorder) EventfCalls(stub func(runtime.Object, string, string, string, ...interface{})) {
|
|
|
+ fake.eventfMutex.Lock()
|
|
|
+ defer fake.eventfMutex.Unlock()
|
|
|
+ fake.EventfStub = stub
|
|
|
+}
|
|
|
+
|
|
|
+func (fake *FakeEventRecorder) EventfArgsForCall(i int) (runtime.Object, string, string, string, []interface{}) {
|
|
|
+ fake.eventfMutex.RLock()
|
|
|
+ defer fake.eventfMutex.RUnlock()
|
|
|
+ argsForCall := fake.eventfArgsForCall[i]
|
|
|
+ return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4, argsForCall.arg5
|
|
|
+}
|
|
|
+
|
|
|
+func (fake *FakeEventRecorder) Invocations() map[string][][]interface{} {
|
|
|
+ fake.invocationsMutex.RLock()
|
|
|
+ defer fake.invocationsMutex.RUnlock()
|
|
|
+ fake.annotatedEventfMutex.RLock()
|
|
|
+ defer fake.annotatedEventfMutex.RUnlock()
|
|
|
+ fake.eventMutex.RLock()
|
|
|
+ defer fake.eventMutex.RUnlock()
|
|
|
+ fake.eventfMutex.RLock()
|
|
|
+ defer fake.eventfMutex.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)
|
|
|
+}
|
|
|
+
|
|
|
+var _ record.EventRecorder = new(FakeEventRecorder)
|