Documentation ¶
Index ¶
- type MockProtocol
- func (_m *MockProtocol) Connected(agentID string) bool
- func (_m *MockProtocol) ConnectedAgentIDs(_a0 context.Context) ([]string, error)
- func (_m *MockProtocol) Disconnect(agentID string) bool
- func (_m *MockProtocol) EXPECT() *MockProtocol_Expecter
- func (_m *MockProtocol) Name() string
- func (_m *MockProtocol) ReportConnectedAgents(ctx context.Context, _a1 store.Store, _a2 time.Time) error
- func (_m *MockProtocol) RequestReport(ctx context.Context, agentID string, report protocol.Report) error
- func (_m *MockProtocol) SendHeartbeat(agentID string) error
- func (_m *MockProtocol) Shutdown(ctx context.Context) error
- func (_m *MockProtocol) UpdateAgent(_a0 context.Context, _a1 *model.Agent, _a2 *protocol.AgentUpdates) error
- type MockProtocol_ConnectedAgentIDs_Call
- func (_c *MockProtocol_ConnectedAgentIDs_Call) Return(_a0 []string, _a1 error) *MockProtocol_ConnectedAgentIDs_Call
- func (_c *MockProtocol_ConnectedAgentIDs_Call) Run(run func(_a0 context.Context)) *MockProtocol_ConnectedAgentIDs_Call
- func (_c *MockProtocol_ConnectedAgentIDs_Call) RunAndReturn(run func(context.Context) ([]string, error)) *MockProtocol_ConnectedAgentIDs_Call
- type MockProtocol_Connected_Call
- type MockProtocol_Disconnect_Call
- type MockProtocol_Expecter
- func (_e *MockProtocol_Expecter) Connected(agentID interface{}) *MockProtocol_Connected_Call
- func (_e *MockProtocol_Expecter) ConnectedAgentIDs(_a0 interface{}) *MockProtocol_ConnectedAgentIDs_Call
- func (_e *MockProtocol_Expecter) Disconnect(agentID interface{}) *MockProtocol_Disconnect_Call
- func (_e *MockProtocol_Expecter) Name() *MockProtocol_Name_Call
- func (_e *MockProtocol_Expecter) ReportConnectedAgents(ctx interface{}, _a1 interface{}, _a2 interface{}) *MockProtocol_ReportConnectedAgents_Call
- func (_e *MockProtocol_Expecter) RequestReport(ctx interface{}, agentID interface{}, report interface{}) *MockProtocol_RequestReport_Call
- func (_e *MockProtocol_Expecter) SendHeartbeat(agentID interface{}) *MockProtocol_SendHeartbeat_Call
- func (_e *MockProtocol_Expecter) Shutdown(ctx interface{}) *MockProtocol_Shutdown_Call
- func (_e *MockProtocol_Expecter) UpdateAgent(_a0 interface{}, _a1 interface{}, _a2 interface{}) *MockProtocol_UpdateAgent_Call
- type MockProtocol_Name_Call
- type MockProtocol_ReportConnectedAgents_Call
- func (_c *MockProtocol_ReportConnectedAgents_Call) Return(_a0 error) *MockProtocol_ReportConnectedAgents_Call
- func (_c *MockProtocol_ReportConnectedAgents_Call) Run(run func(ctx context.Context, _a1 store.Store, _a2 time.Time)) *MockProtocol_ReportConnectedAgents_Call
- func (_c *MockProtocol_ReportConnectedAgents_Call) RunAndReturn(run func(context.Context, store.Store, time.Time) error) *MockProtocol_ReportConnectedAgents_Call
- type MockProtocol_RequestReport_Call
- func (_c *MockProtocol_RequestReport_Call) Return(_a0 error) *MockProtocol_RequestReport_Call
- func (_c *MockProtocol_RequestReport_Call) Run(run func(ctx context.Context, agentID string, report protocol.Report)) *MockProtocol_RequestReport_Call
- func (_c *MockProtocol_RequestReport_Call) RunAndReturn(run func(context.Context, string, protocol.Report) error) *MockProtocol_RequestReport_Call
- type MockProtocol_SendHeartbeat_Call
- func (_c *MockProtocol_SendHeartbeat_Call) Return(_a0 error) *MockProtocol_SendHeartbeat_Call
- func (_c *MockProtocol_SendHeartbeat_Call) Run(run func(agentID string)) *MockProtocol_SendHeartbeat_Call
- func (_c *MockProtocol_SendHeartbeat_Call) RunAndReturn(run func(string) error) *MockProtocol_SendHeartbeat_Call
- type MockProtocol_Shutdown_Call
- type MockProtocol_UpdateAgent_Call
- func (_c *MockProtocol_UpdateAgent_Call) Return(_a0 error) *MockProtocol_UpdateAgent_Call
- func (_c *MockProtocol_UpdateAgent_Call) Run(run func(_a0 context.Context, _a1 *model.Agent, _a2 *protocol.AgentUpdates)) *MockProtocol_UpdateAgent_Call
- func (_c *MockProtocol_UpdateAgent_Call) RunAndReturn(run func(context.Context, *model.Agent, *protocol.AgentUpdates) error) *MockProtocol_UpdateAgent_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockProtocol ¶
MockProtocol is an autogenerated mock type for the Protocol type
func NewMockProtocol ¶
func NewMockProtocol(t interface { mock.TestingT Cleanup(func()) }) *MockProtocol
NewMockProtocol creates a new instance of MockProtocol. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockProtocol) Connected ¶
func (_m *MockProtocol) Connected(agentID string) bool
Connected provides a mock function with given fields: agentID
func (*MockProtocol) ConnectedAgentIDs ¶
func (_m *MockProtocol) ConnectedAgentIDs(_a0 context.Context) ([]string, error)
ConnectedAgentIDs provides a mock function with given fields: _a0
func (*MockProtocol) Disconnect ¶
func (_m *MockProtocol) Disconnect(agentID string) bool
Disconnect provides a mock function with given fields: agentID
func (*MockProtocol) EXPECT ¶ added in v1.22.0
func (_m *MockProtocol) EXPECT() *MockProtocol_Expecter
func (*MockProtocol) Name ¶
func (_m *MockProtocol) Name() string
Name provides a mock function with given fields:
func (*MockProtocol) ReportConnectedAgents ¶ added in v1.23.0
func (_m *MockProtocol) ReportConnectedAgents(ctx context.Context, _a1 store.Store, _a2 time.Time) error
ReportConnectedAgents provides a mock function with given fields: ctx, _a1, _a2
func (*MockProtocol) RequestReport ¶
func (_m *MockProtocol) RequestReport(ctx context.Context, agentID string, report protocol.Report) error
RequestReport provides a mock function with given fields: ctx, agentID, report
func (*MockProtocol) SendHeartbeat ¶
func (_m *MockProtocol) SendHeartbeat(agentID string) error
SendHeartbeat provides a mock function with given fields: agentID
func (*MockProtocol) Shutdown ¶
func (_m *MockProtocol) Shutdown(ctx context.Context) error
Shutdown provides a mock function with given fields: ctx
func (*MockProtocol) UpdateAgent ¶
func (_m *MockProtocol) UpdateAgent(_a0 context.Context, _a1 *model.Agent, _a2 *protocol.AgentUpdates) error
UpdateAgent provides a mock function with given fields: _a0, _a1, _a2
type MockProtocol_ConnectedAgentIDs_Call ¶ added in v1.22.0
MockProtocol_ConnectedAgentIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConnectedAgentIDs'
func (*MockProtocol_ConnectedAgentIDs_Call) Return ¶ added in v1.22.0
func (_c *MockProtocol_ConnectedAgentIDs_Call) Return(_a0 []string, _a1 error) *MockProtocol_ConnectedAgentIDs_Call
func (*MockProtocol_ConnectedAgentIDs_Call) Run ¶ added in v1.22.0
func (_c *MockProtocol_ConnectedAgentIDs_Call) Run(run func(_a0 context.Context)) *MockProtocol_ConnectedAgentIDs_Call
func (*MockProtocol_ConnectedAgentIDs_Call) RunAndReturn ¶ added in v1.22.0
func (_c *MockProtocol_ConnectedAgentIDs_Call) RunAndReturn(run func(context.Context) ([]string, error)) *MockProtocol_ConnectedAgentIDs_Call
type MockProtocol_Connected_Call ¶ added in v1.22.0
MockProtocol_Connected_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Connected'
func (*MockProtocol_Connected_Call) Return ¶ added in v1.22.0
func (_c *MockProtocol_Connected_Call) Return(_a0 bool) *MockProtocol_Connected_Call
func (*MockProtocol_Connected_Call) Run ¶ added in v1.22.0
func (_c *MockProtocol_Connected_Call) Run(run func(agentID string)) *MockProtocol_Connected_Call
func (*MockProtocol_Connected_Call) RunAndReturn ¶ added in v1.22.0
func (_c *MockProtocol_Connected_Call) RunAndReturn(run func(string) bool) *MockProtocol_Connected_Call
type MockProtocol_Disconnect_Call ¶ added in v1.22.0
MockProtocol_Disconnect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Disconnect'
func (*MockProtocol_Disconnect_Call) Return ¶ added in v1.22.0
func (_c *MockProtocol_Disconnect_Call) Return(_a0 bool) *MockProtocol_Disconnect_Call
func (*MockProtocol_Disconnect_Call) Run ¶ added in v1.22.0
func (_c *MockProtocol_Disconnect_Call) Run(run func(agentID string)) *MockProtocol_Disconnect_Call
func (*MockProtocol_Disconnect_Call) RunAndReturn ¶ added in v1.22.0
func (_c *MockProtocol_Disconnect_Call) RunAndReturn(run func(string) bool) *MockProtocol_Disconnect_Call
type MockProtocol_Expecter ¶ added in v1.22.0
type MockProtocol_Expecter struct {
// contains filtered or unexported fields
}
func (*MockProtocol_Expecter) Connected ¶ added in v1.22.0
func (_e *MockProtocol_Expecter) Connected(agentID interface{}) *MockProtocol_Connected_Call
Connected is a helper method to define mock.On call
- agentID string
func (*MockProtocol_Expecter) ConnectedAgentIDs ¶ added in v1.22.0
func (_e *MockProtocol_Expecter) ConnectedAgentIDs(_a0 interface{}) *MockProtocol_ConnectedAgentIDs_Call
ConnectedAgentIDs is a helper method to define mock.On call
- _a0 context.Context
func (*MockProtocol_Expecter) Disconnect ¶ added in v1.22.0
func (_e *MockProtocol_Expecter) Disconnect(agentID interface{}) *MockProtocol_Disconnect_Call
Disconnect is a helper method to define mock.On call
- agentID string
func (*MockProtocol_Expecter) Name ¶ added in v1.22.0
func (_e *MockProtocol_Expecter) Name() *MockProtocol_Name_Call
Name is a helper method to define mock.On call
func (*MockProtocol_Expecter) ReportConnectedAgents ¶ added in v1.23.0
func (_e *MockProtocol_Expecter) ReportConnectedAgents(ctx interface{}, _a1 interface{}, _a2 interface{}) *MockProtocol_ReportConnectedAgents_Call
ReportConnectedAgents is a helper method to define mock.On call
- ctx context.Context
- _a1 store.Store
- _a2 time.Time
func (*MockProtocol_Expecter) RequestReport ¶ added in v1.22.0
func (_e *MockProtocol_Expecter) RequestReport(ctx interface{}, agentID interface{}, report interface{}) *MockProtocol_RequestReport_Call
RequestReport is a helper method to define mock.On call
- ctx context.Context
- agentID string
- report protocol.Report
func (*MockProtocol_Expecter) SendHeartbeat ¶ added in v1.22.0
func (_e *MockProtocol_Expecter) SendHeartbeat(agentID interface{}) *MockProtocol_SendHeartbeat_Call
SendHeartbeat is a helper method to define mock.On call
- agentID string
func (*MockProtocol_Expecter) Shutdown ¶ added in v1.22.0
func (_e *MockProtocol_Expecter) Shutdown(ctx interface{}) *MockProtocol_Shutdown_Call
Shutdown is a helper method to define mock.On call
- ctx context.Context
func (*MockProtocol_Expecter) UpdateAgent ¶ added in v1.22.0
func (_e *MockProtocol_Expecter) UpdateAgent(_a0 interface{}, _a1 interface{}, _a2 interface{}) *MockProtocol_UpdateAgent_Call
UpdateAgent is a helper method to define mock.On call
- _a0 context.Context
- _a1 *model.Agent
- _a2 *protocol.AgentUpdates
type MockProtocol_Name_Call ¶ added in v1.22.0
MockProtocol_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name'
func (*MockProtocol_Name_Call) Return ¶ added in v1.22.0
func (_c *MockProtocol_Name_Call) Return(_a0 string) *MockProtocol_Name_Call
func (*MockProtocol_Name_Call) Run ¶ added in v1.22.0
func (_c *MockProtocol_Name_Call) Run(run func()) *MockProtocol_Name_Call
func (*MockProtocol_Name_Call) RunAndReturn ¶ added in v1.22.0
func (_c *MockProtocol_Name_Call) RunAndReturn(run func() string) *MockProtocol_Name_Call
type MockProtocol_ReportConnectedAgents_Call ¶ added in v1.23.0
MockProtocol_ReportConnectedAgents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReportConnectedAgents'
func (*MockProtocol_ReportConnectedAgents_Call) Return ¶ added in v1.23.0
func (_c *MockProtocol_ReportConnectedAgents_Call) Return(_a0 error) *MockProtocol_ReportConnectedAgents_Call
func (*MockProtocol_ReportConnectedAgents_Call) Run ¶ added in v1.23.0
func (_c *MockProtocol_ReportConnectedAgents_Call) Run(run func(ctx context.Context, _a1 store.Store, _a2 time.Time)) *MockProtocol_ReportConnectedAgents_Call
func (*MockProtocol_ReportConnectedAgents_Call) RunAndReturn ¶ added in v1.23.0
func (_c *MockProtocol_ReportConnectedAgents_Call) RunAndReturn(run func(context.Context, store.Store, time.Time) error) *MockProtocol_ReportConnectedAgents_Call
type MockProtocol_RequestReport_Call ¶ added in v1.22.0
MockProtocol_RequestReport_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RequestReport'
func (*MockProtocol_RequestReport_Call) Return ¶ added in v1.22.0
func (_c *MockProtocol_RequestReport_Call) Return(_a0 error) *MockProtocol_RequestReport_Call
func (*MockProtocol_RequestReport_Call) Run ¶ added in v1.22.0
func (_c *MockProtocol_RequestReport_Call) Run(run func(ctx context.Context, agentID string, report protocol.Report)) *MockProtocol_RequestReport_Call
func (*MockProtocol_RequestReport_Call) RunAndReturn ¶ added in v1.22.0
func (_c *MockProtocol_RequestReport_Call) RunAndReturn(run func(context.Context, string, protocol.Report) error) *MockProtocol_RequestReport_Call
type MockProtocol_SendHeartbeat_Call ¶ added in v1.22.0
MockProtocol_SendHeartbeat_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendHeartbeat'
func (*MockProtocol_SendHeartbeat_Call) Return ¶ added in v1.22.0
func (_c *MockProtocol_SendHeartbeat_Call) Return(_a0 error) *MockProtocol_SendHeartbeat_Call
func (*MockProtocol_SendHeartbeat_Call) Run ¶ added in v1.22.0
func (_c *MockProtocol_SendHeartbeat_Call) Run(run func(agentID string)) *MockProtocol_SendHeartbeat_Call
func (*MockProtocol_SendHeartbeat_Call) RunAndReturn ¶ added in v1.22.0
func (_c *MockProtocol_SendHeartbeat_Call) RunAndReturn(run func(string) error) *MockProtocol_SendHeartbeat_Call
type MockProtocol_Shutdown_Call ¶ added in v1.22.0
MockProtocol_Shutdown_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Shutdown'
func (*MockProtocol_Shutdown_Call) Return ¶ added in v1.22.0
func (_c *MockProtocol_Shutdown_Call) Return(_a0 error) *MockProtocol_Shutdown_Call
func (*MockProtocol_Shutdown_Call) Run ¶ added in v1.22.0
func (_c *MockProtocol_Shutdown_Call) Run(run func(ctx context.Context)) *MockProtocol_Shutdown_Call
func (*MockProtocol_Shutdown_Call) RunAndReturn ¶ added in v1.22.0
func (_c *MockProtocol_Shutdown_Call) RunAndReturn(run func(context.Context) error) *MockProtocol_Shutdown_Call
type MockProtocol_UpdateAgent_Call ¶ added in v1.22.0
MockProtocol_UpdateAgent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAgent'
func (*MockProtocol_UpdateAgent_Call) Return ¶ added in v1.22.0
func (_c *MockProtocol_UpdateAgent_Call) Return(_a0 error) *MockProtocol_UpdateAgent_Call
func (*MockProtocol_UpdateAgent_Call) Run ¶ added in v1.22.0
func (_c *MockProtocol_UpdateAgent_Call) Run(run func(_a0 context.Context, _a1 *model.Agent, _a2 *protocol.AgentUpdates)) *MockProtocol_UpdateAgent_Call
func (*MockProtocol_UpdateAgent_Call) RunAndReturn ¶ added in v1.22.0
func (_c *MockProtocol_UpdateAgent_Call) RunAndReturn(run func(context.Context, *model.Agent, *protocol.AgentUpdates) error) *MockProtocol_UpdateAgent_Call