Documentation
¶
Index ¶
- type MockConnectionManager
- func (_mock *MockConnectionManager) AddConnection(conn types.Connection, message *protobufs.AgentToServer)
- func (_mock *MockConnectionManager) DispatchRestartCommand(ctx context.Context) error
- func (_m *MockConnectionManager) EXPECT() *MockConnectionManager_Expecter
- func (_mock *MockConnectionManager) IsAgentManaged(agentName string) bool
- func (_mock *MockConnectionManager) RemoveConnection(conn types.Connection)
- type MockConnectionManager_AddConnection_Call
- func (_c *MockConnectionManager_AddConnection_Call) Return() *MockConnectionManager_AddConnection_Call
- func (_c *MockConnectionManager_AddConnection_Call) Run(run func(conn types.Connection, message *protobufs.AgentToServer)) *MockConnectionManager_AddConnection_Call
- func (_c *MockConnectionManager_AddConnection_Call) RunAndReturn(run func(conn types.Connection, message *protobufs.AgentToServer)) *MockConnectionManager_AddConnection_Call
- type MockConnectionManager_DispatchRestartCommand_Call
- func (_c *MockConnectionManager_DispatchRestartCommand_Call) Return(err error) *MockConnectionManager_DispatchRestartCommand_Call
- func (_c *MockConnectionManager_DispatchRestartCommand_Call) Run(run func(ctx context.Context)) *MockConnectionManager_DispatchRestartCommand_Call
- func (_c *MockConnectionManager_DispatchRestartCommand_Call) RunAndReturn(run func(ctx context.Context) error) *MockConnectionManager_DispatchRestartCommand_Call
- type MockConnectionManager_Expecter
- func (_e *MockConnectionManager_Expecter) AddConnection(conn interface{}, message interface{}) *MockConnectionManager_AddConnection_Call
- func (_e *MockConnectionManager_Expecter) DispatchRestartCommand(ctx interface{}) *MockConnectionManager_DispatchRestartCommand_Call
- func (_e *MockConnectionManager_Expecter) IsAgentManaged(agentName interface{}) *MockConnectionManager_IsAgentManaged_Call
- func (_e *MockConnectionManager_Expecter) RemoveConnection(conn interface{}) *MockConnectionManager_RemoveConnection_Call
- type MockConnectionManager_IsAgentManaged_Call
- func (_c *MockConnectionManager_IsAgentManaged_Call) Return(b bool) *MockConnectionManager_IsAgentManaged_Call
- func (_c *MockConnectionManager_IsAgentManaged_Call) Run(run func(agentName string)) *MockConnectionManager_IsAgentManaged_Call
- func (_c *MockConnectionManager_IsAgentManaged_Call) RunAndReturn(run func(agentName string) bool) *MockConnectionManager_IsAgentManaged_Call
- type MockConnectionManager_RemoveConnection_Call
- func (_c *MockConnectionManager_RemoveConnection_Call) Return() *MockConnectionManager_RemoveConnection_Call
- func (_c *MockConnectionManager_RemoveConnection_Call) Run(run func(conn types.Connection)) *MockConnectionManager_RemoveConnection_Call
- func (_c *MockConnectionManager_RemoveConnection_Call) RunAndReturn(run func(conn types.Connection)) *MockConnectionManager_RemoveConnection_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockConnectionManager ¶
MockConnectionManager is an autogenerated mock type for the ConnectionManager type
func NewMockConnectionManager ¶
func NewMockConnectionManager(t interface {
mock.TestingT
Cleanup(func())
}) *MockConnectionManager
NewMockConnectionManager creates a new instance of MockConnectionManager. 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 (*MockConnectionManager) AddConnection ¶
func (_mock *MockConnectionManager) AddConnection(conn types.Connection, message *protobufs.AgentToServer)
AddConnection provides a mock function for the type MockConnectionManager
func (*MockConnectionManager) DispatchRestartCommand ¶
func (_mock *MockConnectionManager) DispatchRestartCommand(ctx context.Context) error
DispatchRestartCommand provides a mock function for the type MockConnectionManager
func (*MockConnectionManager) EXPECT ¶
func (_m *MockConnectionManager) EXPECT() *MockConnectionManager_Expecter
func (*MockConnectionManager) IsAgentManaged ¶ added in v0.3.1
func (_mock *MockConnectionManager) IsAgentManaged(agentName string) bool
IsAgentManaged provides a mock function for the type MockConnectionManager
func (*MockConnectionManager) RemoveConnection ¶
func (_mock *MockConnectionManager) RemoveConnection(conn types.Connection)
RemoveConnection provides a mock function for the type MockConnectionManager
type MockConnectionManager_AddConnection_Call ¶
MockConnectionManager_AddConnection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddConnection'
func (*MockConnectionManager_AddConnection_Call) Return ¶
func (_c *MockConnectionManager_AddConnection_Call) Return() *MockConnectionManager_AddConnection_Call
func (*MockConnectionManager_AddConnection_Call) Run ¶
func (_c *MockConnectionManager_AddConnection_Call) Run(run func(conn types.Connection, message *protobufs.AgentToServer)) *MockConnectionManager_AddConnection_Call
func (*MockConnectionManager_AddConnection_Call) RunAndReturn ¶
func (_c *MockConnectionManager_AddConnection_Call) RunAndReturn(run func(conn types.Connection, message *protobufs.AgentToServer)) *MockConnectionManager_AddConnection_Call
type MockConnectionManager_DispatchRestartCommand_Call ¶
MockConnectionManager_DispatchRestartCommand_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DispatchRestartCommand'
func (*MockConnectionManager_DispatchRestartCommand_Call) Return ¶
func (_c *MockConnectionManager_DispatchRestartCommand_Call) Return(err error) *MockConnectionManager_DispatchRestartCommand_Call
func (*MockConnectionManager_DispatchRestartCommand_Call) Run ¶
func (_c *MockConnectionManager_DispatchRestartCommand_Call) Run(run func(ctx context.Context)) *MockConnectionManager_DispatchRestartCommand_Call
func (*MockConnectionManager_DispatchRestartCommand_Call) RunAndReturn ¶
func (_c *MockConnectionManager_DispatchRestartCommand_Call) RunAndReturn(run func(ctx context.Context) error) *MockConnectionManager_DispatchRestartCommand_Call
type MockConnectionManager_Expecter ¶
type MockConnectionManager_Expecter struct {
// contains filtered or unexported fields
}
func (*MockConnectionManager_Expecter) AddConnection ¶
func (_e *MockConnectionManager_Expecter) AddConnection(conn interface{}, message interface{}) *MockConnectionManager_AddConnection_Call
AddConnection is a helper method to define mock.On call
- conn types.Connection
- message *protobufs.AgentToServer
func (*MockConnectionManager_Expecter) DispatchRestartCommand ¶
func (_e *MockConnectionManager_Expecter) DispatchRestartCommand(ctx interface{}) *MockConnectionManager_DispatchRestartCommand_Call
DispatchRestartCommand is a helper method to define mock.On call
- ctx context.Context
func (*MockConnectionManager_Expecter) IsAgentManaged ¶ added in v0.3.1
func (_e *MockConnectionManager_Expecter) IsAgentManaged(agentName interface{}) *MockConnectionManager_IsAgentManaged_Call
IsAgentManaged is a helper method to define mock.On call
- agentName string
func (*MockConnectionManager_Expecter) RemoveConnection ¶
func (_e *MockConnectionManager_Expecter) RemoveConnection(conn interface{}) *MockConnectionManager_RemoveConnection_Call
RemoveConnection is a helper method to define mock.On call
- conn types.Connection
type MockConnectionManager_IsAgentManaged_Call ¶ added in v0.3.1
MockConnectionManager_IsAgentManaged_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsAgentManaged'
func (*MockConnectionManager_IsAgentManaged_Call) Return ¶ added in v0.3.1
func (_c *MockConnectionManager_IsAgentManaged_Call) Return(b bool) *MockConnectionManager_IsAgentManaged_Call
func (*MockConnectionManager_IsAgentManaged_Call) Run ¶ added in v0.3.1
func (_c *MockConnectionManager_IsAgentManaged_Call) Run(run func(agentName string)) *MockConnectionManager_IsAgentManaged_Call
func (*MockConnectionManager_IsAgentManaged_Call) RunAndReturn ¶ added in v0.3.1
func (_c *MockConnectionManager_IsAgentManaged_Call) RunAndReturn(run func(agentName string) bool) *MockConnectionManager_IsAgentManaged_Call
type MockConnectionManager_RemoveConnection_Call ¶
MockConnectionManager_RemoveConnection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveConnection'
func (*MockConnectionManager_RemoveConnection_Call) Return ¶
func (_c *MockConnectionManager_RemoveConnection_Call) Return() *MockConnectionManager_RemoveConnection_Call
func (*MockConnectionManager_RemoveConnection_Call) Run ¶
func (_c *MockConnectionManager_RemoveConnection_Call) Run(run func(conn types.Connection)) *MockConnectionManager_RemoveConnection_Call
func (*MockConnectionManager_RemoveConnection_Call) RunAndReturn ¶
func (_c *MockConnectionManager_RemoveConnection_Call) RunAndReturn(run func(conn types.Connection)) *MockConnectionManager_RemoveConnection_Call