-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
job_subscriber.go
97 lines (76 loc) · 1.99 KB
/
job_subscriber.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
// Code generated by mockery v2.2.1. DO NOT EDIT.
package mocks
import (
context "context"
models "github.com/smartcontractkit/chainlink/core/store/models"
mock "github.com/stretchr/testify/mock"
)
// JobSubscriber is an autogenerated mock type for the JobSubscriber type
type JobSubscriber struct {
mock.Mock
}
// AddJob provides a mock function with given fields: job, bn
func (_m *JobSubscriber) AddJob(job models.JobSpec, bn *models.Head) error {
ret := _m.Called(job, bn)
var r0 error
if rf, ok := ret.Get(0).(func(models.JobSpec, *models.Head) error); ok {
r0 = rf(job, bn)
} else {
r0 = ret.Error(0)
}
return r0
}
// Connect provides a mock function with given fields: head
func (_m *JobSubscriber) Connect(head *models.Head) error {
ret := _m.Called(head)
var r0 error
if rf, ok := ret.Get(0).(func(*models.Head) error); ok {
r0 = rf(head)
} else {
r0 = ret.Error(0)
}
return r0
}
// Disconnect provides a mock function with given fields:
func (_m *JobSubscriber) Disconnect() {
_m.Called()
}
// Jobs provides a mock function with given fields:
func (_m *JobSubscriber) Jobs() []models.JobSpec {
ret := _m.Called()
var r0 []models.JobSpec
if rf, ok := ret.Get(0).(func() []models.JobSpec); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]models.JobSpec)
}
}
return r0
}
// OnNewLongestChain provides a mock function with given fields: ctx, head
func (_m *JobSubscriber) OnNewLongestChain(ctx context.Context, head models.Head) {
_m.Called(ctx, head)
}
// RemoveJob provides a mock function with given fields: ID
func (_m *JobSubscriber) RemoveJob(ID *models.ID) error {
ret := _m.Called(ID)
var r0 error
if rf, ok := ret.Get(0).(func(*models.ID) error); ok {
r0 = rf(ID)
} else {
r0 = ret.Error(0)
}
return r0
}
// Stop provides a mock function with given fields:
func (_m *JobSubscriber) Stop() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}