-
Notifications
You must be signed in to change notification settings - Fork 286
/
reconciler.go
130 lines (109 loc) Β· 4.6 KB
/
reconciler.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
// Code generated by MockGen. DO NOT EDIT.
// Source: pkg/providers/tinkerbell/reconciler/reconciler.go
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
reflect "reflect"
cluster "github.com/aws/eks-anywhere/pkg/cluster"
controller "github.com/aws/eks-anywhere/pkg/controller"
logr "github.com/go-logr/logr"
gomock "github.com/golang/mock/gomock"
client "sigs.k8s.io/controller-runtime/pkg/client"
)
// MockCNIReconciler is a mock of CNIReconciler interface.
type MockCNIReconciler struct {
ctrl *gomock.Controller
recorder *MockCNIReconcilerMockRecorder
}
// MockCNIReconcilerMockRecorder is the mock recorder for MockCNIReconciler.
type MockCNIReconcilerMockRecorder struct {
mock *MockCNIReconciler
}
// NewMockCNIReconciler creates a new mock instance.
func NewMockCNIReconciler(ctrl *gomock.Controller) *MockCNIReconciler {
mock := &MockCNIReconciler{ctrl: ctrl}
mock.recorder = &MockCNIReconcilerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockCNIReconciler) EXPECT() *MockCNIReconcilerMockRecorder {
return m.recorder
}
// Reconcile mocks base method.
func (m *MockCNIReconciler) Reconcile(ctx context.Context, logger logr.Logger, client client.Client, spec *cluster.Spec) (controller.Result, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Reconcile", ctx, logger, client, spec)
ret0, _ := ret[0].(controller.Result)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Reconcile indicates an expected call of Reconcile.
func (mr *MockCNIReconcilerMockRecorder) Reconcile(ctx, logger, client, spec interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reconcile", reflect.TypeOf((*MockCNIReconciler)(nil).Reconcile), ctx, logger, client, spec)
}
// MockRemoteClientRegistry is a mock of RemoteClientRegistry interface.
type MockRemoteClientRegistry struct {
ctrl *gomock.Controller
recorder *MockRemoteClientRegistryMockRecorder
}
// MockRemoteClientRegistryMockRecorder is the mock recorder for MockRemoteClientRegistry.
type MockRemoteClientRegistryMockRecorder struct {
mock *MockRemoteClientRegistry
}
// NewMockRemoteClientRegistry creates a new mock instance.
func NewMockRemoteClientRegistry(ctrl *gomock.Controller) *MockRemoteClientRegistry {
mock := &MockRemoteClientRegistry{ctrl: ctrl}
mock.recorder = &MockRemoteClientRegistryMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockRemoteClientRegistry) EXPECT() *MockRemoteClientRegistryMockRecorder {
return m.recorder
}
// GetClient mocks base method.
func (m *MockRemoteClientRegistry) GetClient(ctx context.Context, cluster client.ObjectKey) (client.Client, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetClient", ctx, cluster)
ret0, _ := ret[0].(client.Client)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetClient indicates an expected call of GetClient.
func (mr *MockRemoteClientRegistryMockRecorder) GetClient(ctx, cluster interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClient", reflect.TypeOf((*MockRemoteClientRegistry)(nil).GetClient), ctx, cluster)
}
// MockIPValidator is a mock of IPValidator interface.
type MockIPValidator struct {
ctrl *gomock.Controller
recorder *MockIPValidatorMockRecorder
}
// MockIPValidatorMockRecorder is the mock recorder for MockIPValidator.
type MockIPValidatorMockRecorder struct {
mock *MockIPValidator
}
// NewMockIPValidator creates a new mock instance.
func NewMockIPValidator(ctrl *gomock.Controller) *MockIPValidator {
mock := &MockIPValidator{ctrl: ctrl}
mock.recorder = &MockIPValidatorMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockIPValidator) EXPECT() *MockIPValidatorMockRecorder {
return m.recorder
}
// ValidateControlPlaneIP mocks base method.
func (m *MockIPValidator) ValidateControlPlaneIP(ctx context.Context, log logr.Logger, spec *cluster.Spec) (controller.Result, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ValidateControlPlaneIP", ctx, log, spec)
ret0, _ := ret[0].(controller.Result)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ValidateControlPlaneIP indicates an expected call of ValidateControlPlaneIP.
func (mr *MockIPValidatorMockRecorder) ValidateControlPlaneIP(ctx, log, spec interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateControlPlaneIP", reflect.TypeOf((*MockIPValidator)(nil).ValidateControlPlaneIP), ctx, log, spec)
}