forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_noaa_consumer.go
197 lines (175 loc) · 5.96 KB
/
fake_noaa_consumer.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
// This file was generated by counterfeiter
package fakes
import (
"sync"
"github.com/cloudfoundry/cli/cf/api"
"github.com/cloudfoundry/sonde-go/events"
)
type FakeNoaaConsumer struct {
TailFunc func(logChan chan<- *events.LogMessage, errChan chan<- error)
GetContainerMetricsStub func(string, string) ([]*events.ContainerMetric, error)
getContainerMetricsMutex sync.RWMutex
getContainerMetricsArgsForCall []struct {
arg1 string
arg2 string
}
getContainerMetricsReturns struct {
result1 []*events.ContainerMetric
result2 error
}
RecentLogsStub func(string, string) ([]*events.LogMessage, error)
recentLogsMutex sync.RWMutex
recentLogsArgsForCall []struct {
arg1 string
arg2 string
}
recentLogsReturns struct {
result1 []*events.LogMessage
result2 error
}
TailingLogsStub func(string, string, chan<- *events.LogMessage, chan<- error)
tailingLogsMutex sync.RWMutex
tailingLogsArgsForCall []struct {
arg1 string
arg2 string
arg3 chan<- *events.LogMessage
arg4 chan<- error
}
SetOnConnectCallbackStub func(func())
setOnConnectCallbackMutex sync.RWMutex
setOnConnectCallbackArgsForCall []struct {
arg1 func()
}
CloseStub func() error
closeMutex sync.RWMutex
closeArgsForCall []struct{}
closeReturns struct {
result1 error
}
}
func (fake *FakeNoaaConsumer) GetContainerMetrics(arg1 string, arg2 string) ([]*events.ContainerMetric, error) {
fake.getContainerMetricsMutex.Lock()
fake.getContainerMetricsArgsForCall = append(fake.getContainerMetricsArgsForCall, struct {
arg1 string
arg2 string
}{arg1, arg2})
fake.getContainerMetricsMutex.Unlock()
if fake.GetContainerMetricsStub != nil {
return fake.GetContainerMetricsStub(arg1, arg2)
} else {
return fake.getContainerMetricsReturns.result1, fake.getContainerMetricsReturns.result2
}
}
func (fake *FakeNoaaConsumer) GetContainerMetricsCallCount() int {
fake.getContainerMetricsMutex.RLock()
defer fake.getContainerMetricsMutex.RUnlock()
return len(fake.getContainerMetricsArgsForCall)
}
func (fake *FakeNoaaConsumer) GetContainerMetricsArgsForCall(i int) (string, string) {
fake.getContainerMetricsMutex.RLock()
defer fake.getContainerMetricsMutex.RUnlock()
return fake.getContainerMetricsArgsForCall[i].arg1, fake.getContainerMetricsArgsForCall[i].arg2
}
func (fake *FakeNoaaConsumer) GetContainerMetricsReturns(result1 []*events.ContainerMetric, result2 error) {
fake.GetContainerMetricsStub = nil
fake.getContainerMetricsReturns = struct {
result1 []*events.ContainerMetric
result2 error
}{result1, result2}
}
func (fake *FakeNoaaConsumer) RecentLogs(arg1 string, arg2 string) ([]*events.LogMessage, error) {
fake.recentLogsMutex.Lock()
fake.recentLogsArgsForCall = append(fake.recentLogsArgsForCall, struct {
arg1 string
arg2 string
}{arg1, arg2})
fake.recentLogsMutex.Unlock()
if fake.RecentLogsStub != nil {
return fake.RecentLogsStub(arg1, arg2)
} else {
return fake.recentLogsReturns.result1, fake.recentLogsReturns.result2
}
}
func (fake *FakeNoaaConsumer) RecentLogsCallCount() int {
fake.recentLogsMutex.RLock()
defer fake.recentLogsMutex.RUnlock()
return len(fake.recentLogsArgsForCall)
}
func (fake *FakeNoaaConsumer) RecentLogsArgsForCall(i int) (string, string) {
fake.recentLogsMutex.RLock()
defer fake.recentLogsMutex.RUnlock()
return fake.recentLogsArgsForCall[i].arg1, fake.recentLogsArgsForCall[i].arg2
}
func (fake *FakeNoaaConsumer) RecentLogsReturns(result1 []*events.LogMessage, result2 error) {
fake.RecentLogsStub = nil
fake.recentLogsReturns = struct {
result1 []*events.LogMessage
result2 error
}{result1, result2}
}
func (fake *FakeNoaaConsumer) TailingLogs(arg1 string, arg2 string, arg3 chan<- *events.LogMessage, arg4 chan<- error) {
fake.tailingLogsMutex.Lock()
fake.tailingLogsArgsForCall = append(fake.tailingLogsArgsForCall, struct {
arg1 string
arg2 string
arg3 chan<- *events.LogMessage
arg4 chan<- error
}{arg1, arg2, arg3, arg4})
fake.tailingLogsMutex.Unlock()
if fake.TailingLogsStub != nil {
fake.TailingLogsStub(arg1, arg2, arg3, arg4)
}
fake.TailFunc(arg3, arg4)
}
func (fake *FakeNoaaConsumer) TailingLogsCallCount() int {
fake.tailingLogsMutex.RLock()
defer fake.tailingLogsMutex.RUnlock()
return len(fake.tailingLogsArgsForCall)
}
func (fake *FakeNoaaConsumer) TailingLogsArgsForCall(i int) (string, string, chan<- *events.LogMessage, chan<- error) {
fake.tailingLogsMutex.RLock()
defer fake.tailingLogsMutex.RUnlock()
return fake.tailingLogsArgsForCall[i].arg1, fake.tailingLogsArgsForCall[i].arg2, fake.tailingLogsArgsForCall[i].arg3, fake.tailingLogsArgsForCall[i].arg4
}
func (fake *FakeNoaaConsumer) SetOnConnectCallback(arg1 func()) {
fake.setOnConnectCallbackMutex.Lock()
fake.setOnConnectCallbackArgsForCall = append(fake.setOnConnectCallbackArgsForCall, struct {
arg1 func()
}{arg1})
fake.setOnConnectCallbackMutex.Unlock()
if fake.SetOnConnectCallbackStub != nil {
fake.SetOnConnectCallbackStub(arg1)
}
}
func (fake *FakeNoaaConsumer) SetOnConnectCallbackCallCount() int {
fake.setOnConnectCallbackMutex.RLock()
defer fake.setOnConnectCallbackMutex.RUnlock()
return len(fake.setOnConnectCallbackArgsForCall)
}
func (fake *FakeNoaaConsumer) SetOnConnectCallbackArgsForCall(i int) func() {
fake.setOnConnectCallbackMutex.RLock()
defer fake.setOnConnectCallbackMutex.RUnlock()
return fake.setOnConnectCallbackArgsForCall[i].arg1
}
func (fake *FakeNoaaConsumer) Close() error {
fake.closeMutex.Lock()
fake.closeArgsForCall = append(fake.closeArgsForCall, struct{}{})
fake.closeMutex.Unlock()
if fake.CloseStub != nil {
return fake.CloseStub()
} else {
return fake.closeReturns.result1
}
}
func (fake *FakeNoaaConsumer) CloseCallCount() int {
fake.closeMutex.RLock()
defer fake.closeMutex.RUnlock()
return len(fake.closeArgsForCall)
}
func (fake *FakeNoaaConsumer) CloseReturns(result1 error) {
fake.CloseStub = nil
fake.closeReturns = struct {
result1 error
}{result1}
}
var _ api.NoaaConsumer = new(FakeNoaaConsumer)