Documentation ¶
Index ¶
- type MockConn
- func (_m *MockConn) Close() error
- func (_m *MockConn) EXPECT() *MockConn_Expecter
- func (_m *MockConn) LocalAddr() net.Addr
- func (_m *MockConn) Read(b []byte) (int, error)
- func (_m *MockConn) RemoteAddr() net.Addr
- func (_m *MockConn) SetDeadline(t time.Time) error
- func (_m *MockConn) SetReadDeadline(t time.Time) error
- func (_m *MockConn) SetWriteDeadline(t time.Time) error
- func (_m *MockConn) Write(b []byte) (int, error)
- type MockConn_Close_Call
- type MockConn_Expecter
- func (_e *MockConn_Expecter) Close() *MockConn_Close_Call
- func (_e *MockConn_Expecter) LocalAddr() *MockConn_LocalAddr_Call
- func (_e *MockConn_Expecter) Read(b interface{}) *MockConn_Read_Call
- func (_e *MockConn_Expecter) RemoteAddr() *MockConn_RemoteAddr_Call
- func (_e *MockConn_Expecter) SetDeadline(t interface{}) *MockConn_SetDeadline_Call
- func (_e *MockConn_Expecter) SetReadDeadline(t interface{}) *MockConn_SetReadDeadline_Call
- func (_e *MockConn_Expecter) SetWriteDeadline(t interface{}) *MockConn_SetWriteDeadline_Call
- func (_e *MockConn_Expecter) Write(b interface{}) *MockConn_Write_Call
- type MockConn_LocalAddr_Call
- type MockConn_Read_Call
- type MockConn_RemoteAddr_Call
- type MockConn_SetDeadline_Call
- type MockConn_SetReadDeadline_Call
- func (_c *MockConn_SetReadDeadline_Call) Return(_a0 error) *MockConn_SetReadDeadline_Call
- func (_c *MockConn_SetReadDeadline_Call) Run(run func(t time.Time)) *MockConn_SetReadDeadline_Call
- func (_c *MockConn_SetReadDeadline_Call) RunAndReturn(run func(time.Time) error) *MockConn_SetReadDeadline_Call
- type MockConn_SetWriteDeadline_Call
- func (_c *MockConn_SetWriteDeadline_Call) Return(_a0 error) *MockConn_SetWriteDeadline_Call
- func (_c *MockConn_SetWriteDeadline_Call) Run(run func(t time.Time)) *MockConn_SetWriteDeadline_Call
- func (_c *MockConn_SetWriteDeadline_Call) RunAndReturn(run func(time.Time) error) *MockConn_SetWriteDeadline_Call
- type MockConn_Write_Call
- type MockConnection
- type MockConnection_Connection_Call
- type MockConnection_Disconnect_Call
- type MockConnection_Expecter
- type MockConnection_Send_Call
- func (_c *MockConnection_Send_Call) Return(_a0 error) *MockConnection_Send_Call
- func (_c *MockConnection_Send_Call) Run(run func(ctx context.Context, message *protobufs.ServerToAgent)) *MockConnection_Send_Call
- func (_c *MockConnection_Send_Call) RunAndReturn(run func(context.Context, *protobufs.ServerToAgent) error) *MockConnection_Send_Call
- type MockConnections
- func (_m *MockConnections[S]) Connected(agentID string) bool
- func (_m *MockConnections[S]) ConnectedAgentIDs(_a0 context.Context) []string
- func (_m *MockConnections[S]) ConnectedAgentsCount(_a0 context.Context) int
- func (_m *MockConnections[S]) OnConnecting(ctx context.Context, agentID string) S
- func (_m *MockConnections[S]) OnConnectionClose(conn types.Connection) (S, int)
- func (_m *MockConnections[S]) OnMessage(agentID string, conn types.Connection) (S, error)
- func (_m *MockConnections[S]) StateForAgentID(agentID string) S
- func (_m *MockConnections[S]) StateForConnection(_a0 types.Connection) S
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockConn ¶ added in v1.22.0
MockConn is an autogenerated mock type for the conn type
func NewMockConn ¶ added in v1.22.0
NewMockConn creates a new instance of MockConn. 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 (*MockConn) EXPECT ¶ added in v1.22.0
func (_m *MockConn) EXPECT() *MockConn_Expecter
func (*MockConn) RemoteAddr ¶ added in v1.22.0
RemoteAddr provides a mock function with given fields:
func (*MockConn) SetDeadline ¶ added in v1.22.0
SetDeadline provides a mock function with given fields: t
func (*MockConn) SetReadDeadline ¶ added in v1.22.0
SetReadDeadline provides a mock function with given fields: t
func (*MockConn) SetWriteDeadline ¶ added in v1.22.0
SetWriteDeadline provides a mock function with given fields: t
type MockConn_Close_Call ¶ added in v1.22.0
MockConn_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
func (*MockConn_Close_Call) Return ¶ added in v1.22.0
func (_c *MockConn_Close_Call) Return(_a0 error) *MockConn_Close_Call
func (*MockConn_Close_Call) Run ¶ added in v1.22.0
func (_c *MockConn_Close_Call) Run(run func()) *MockConn_Close_Call
func (*MockConn_Close_Call) RunAndReturn ¶ added in v1.22.0
func (_c *MockConn_Close_Call) RunAndReturn(run func() error) *MockConn_Close_Call
type MockConn_Expecter ¶ added in v1.22.0
type MockConn_Expecter struct {
// contains filtered or unexported fields
}
func (*MockConn_Expecter) Close ¶ added in v1.22.0
func (_e *MockConn_Expecter) Close() *MockConn_Close_Call
Close is a helper method to define mock.On call
func (*MockConn_Expecter) LocalAddr ¶ added in v1.22.0
func (_e *MockConn_Expecter) LocalAddr() *MockConn_LocalAddr_Call
LocalAddr is a helper method to define mock.On call
func (*MockConn_Expecter) Read ¶ added in v1.22.0
func (_e *MockConn_Expecter) Read(b interface{}) *MockConn_Read_Call
Read is a helper method to define mock.On call
- b []byte
func (*MockConn_Expecter) RemoteAddr ¶ added in v1.22.0
func (_e *MockConn_Expecter) RemoteAddr() *MockConn_RemoteAddr_Call
RemoteAddr is a helper method to define mock.On call
func (*MockConn_Expecter) SetDeadline ¶ added in v1.22.0
func (_e *MockConn_Expecter) SetDeadline(t interface{}) *MockConn_SetDeadline_Call
SetDeadline is a helper method to define mock.On call
- t time.Time
func (*MockConn_Expecter) SetReadDeadline ¶ added in v1.22.0
func (_e *MockConn_Expecter) SetReadDeadline(t interface{}) *MockConn_SetReadDeadline_Call
SetReadDeadline is a helper method to define mock.On call
- t time.Time
func (*MockConn_Expecter) SetWriteDeadline ¶ added in v1.22.0
func (_e *MockConn_Expecter) SetWriteDeadline(t interface{}) *MockConn_SetWriteDeadline_Call
SetWriteDeadline is a helper method to define mock.On call
- t time.Time
func (*MockConn_Expecter) Write ¶ added in v1.22.0
func (_e *MockConn_Expecter) Write(b interface{}) *MockConn_Write_Call
Write is a helper method to define mock.On call
- b []byte
type MockConn_LocalAddr_Call ¶ added in v1.22.0
MockConn_LocalAddr_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LocalAddr'
func (*MockConn_LocalAddr_Call) Return ¶ added in v1.22.0
func (_c *MockConn_LocalAddr_Call) Return(_a0 net.Addr) *MockConn_LocalAddr_Call
func (*MockConn_LocalAddr_Call) Run ¶ added in v1.22.0
func (_c *MockConn_LocalAddr_Call) Run(run func()) *MockConn_LocalAddr_Call
func (*MockConn_LocalAddr_Call) RunAndReturn ¶ added in v1.22.0
func (_c *MockConn_LocalAddr_Call) RunAndReturn(run func() net.Addr) *MockConn_LocalAddr_Call
type MockConn_Read_Call ¶ added in v1.22.0
MockConn_Read_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Read'
func (*MockConn_Read_Call) Return ¶ added in v1.22.0
func (_c *MockConn_Read_Call) Return(n int, err error) *MockConn_Read_Call
func (*MockConn_Read_Call) Run ¶ added in v1.22.0
func (_c *MockConn_Read_Call) Run(run func(b []byte)) *MockConn_Read_Call
func (*MockConn_Read_Call) RunAndReturn ¶ added in v1.22.0
func (_c *MockConn_Read_Call) RunAndReturn(run func([]byte) (int, error)) *MockConn_Read_Call
type MockConn_RemoteAddr_Call ¶ added in v1.22.0
MockConn_RemoteAddr_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoteAddr'
func (*MockConn_RemoteAddr_Call) Return ¶ added in v1.22.0
func (_c *MockConn_RemoteAddr_Call) Return(_a0 net.Addr) *MockConn_RemoteAddr_Call
func (*MockConn_RemoteAddr_Call) Run ¶ added in v1.22.0
func (_c *MockConn_RemoteAddr_Call) Run(run func()) *MockConn_RemoteAddr_Call
func (*MockConn_RemoteAddr_Call) RunAndReturn ¶ added in v1.22.0
func (_c *MockConn_RemoteAddr_Call) RunAndReturn(run func() net.Addr) *MockConn_RemoteAddr_Call
type MockConn_SetDeadline_Call ¶ added in v1.22.0
MockConn_SetDeadline_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetDeadline'
func (*MockConn_SetDeadline_Call) Return ¶ added in v1.22.0
func (_c *MockConn_SetDeadline_Call) Return(_a0 error) *MockConn_SetDeadline_Call
func (*MockConn_SetDeadline_Call) Run ¶ added in v1.22.0
func (_c *MockConn_SetDeadline_Call) Run(run func(t time.Time)) *MockConn_SetDeadline_Call
func (*MockConn_SetDeadline_Call) RunAndReturn ¶ added in v1.22.0
func (_c *MockConn_SetDeadline_Call) RunAndReturn(run func(time.Time) error) *MockConn_SetDeadline_Call
type MockConn_SetReadDeadline_Call ¶ added in v1.22.0
MockConn_SetReadDeadline_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetReadDeadline'
func (*MockConn_SetReadDeadline_Call) Return ¶ added in v1.22.0
func (_c *MockConn_SetReadDeadline_Call) Return(_a0 error) *MockConn_SetReadDeadline_Call
func (*MockConn_SetReadDeadline_Call) Run ¶ added in v1.22.0
func (_c *MockConn_SetReadDeadline_Call) Run(run func(t time.Time)) *MockConn_SetReadDeadline_Call
func (*MockConn_SetReadDeadline_Call) RunAndReturn ¶ added in v1.22.0
func (_c *MockConn_SetReadDeadline_Call) RunAndReturn(run func(time.Time) error) *MockConn_SetReadDeadline_Call
type MockConn_SetWriteDeadline_Call ¶ added in v1.22.0
MockConn_SetWriteDeadline_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetWriteDeadline'
func (*MockConn_SetWriteDeadline_Call) Return ¶ added in v1.22.0
func (_c *MockConn_SetWriteDeadline_Call) Return(_a0 error) *MockConn_SetWriteDeadline_Call
func (*MockConn_SetWriteDeadline_Call) Run ¶ added in v1.22.0
func (_c *MockConn_SetWriteDeadline_Call) Run(run func(t time.Time)) *MockConn_SetWriteDeadline_Call
func (*MockConn_SetWriteDeadline_Call) RunAndReturn ¶ added in v1.22.0
func (_c *MockConn_SetWriteDeadline_Call) RunAndReturn(run func(time.Time) error) *MockConn_SetWriteDeadline_Call
type MockConn_Write_Call ¶ added in v1.22.0
MockConn_Write_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Write'
func (*MockConn_Write_Call) Return ¶ added in v1.22.0
func (_c *MockConn_Write_Call) Return(n int, err error) *MockConn_Write_Call
func (*MockConn_Write_Call) Run ¶ added in v1.22.0
func (_c *MockConn_Write_Call) Run(run func(b []byte)) *MockConn_Write_Call
func (*MockConn_Write_Call) RunAndReturn ¶ added in v1.22.0
func (_c *MockConn_Write_Call) RunAndReturn(run func([]byte) (int, error)) *MockConn_Write_Call
type MockConnection ¶
MockConnection is an autogenerated mock type for the Connection type
func NewMockConnection ¶
func NewMockConnection(t interface { mock.TestingT Cleanup(func()) }) *MockConnection
NewMockConnection creates a new instance of MockConnection. 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 (*MockConnection) Connection ¶ added in v1.22.0
func (_m *MockConnection) Connection() net.Conn
Connection provides a mock function with given fields:
func (*MockConnection) Disconnect ¶ added in v1.22.0
func (_m *MockConnection) Disconnect() error
Disconnect provides a mock function with given fields:
func (*MockConnection) EXPECT ¶ added in v1.22.0
func (_m *MockConnection) EXPECT() *MockConnection_Expecter
func (*MockConnection) Send ¶
func (_m *MockConnection) Send(ctx context.Context, message *protobufs.ServerToAgent) error
Send provides a mock function with given fields: ctx, message
type MockConnection_Connection_Call ¶ added in v1.22.0
MockConnection_Connection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Connection'
func (*MockConnection_Connection_Call) Return ¶ added in v1.22.0
func (_c *MockConnection_Connection_Call) Return(_a0 net.Conn) *MockConnection_Connection_Call
func (*MockConnection_Connection_Call) Run ¶ added in v1.22.0
func (_c *MockConnection_Connection_Call) Run(run func()) *MockConnection_Connection_Call
func (*MockConnection_Connection_Call) RunAndReturn ¶ added in v1.22.0
func (_c *MockConnection_Connection_Call) RunAndReturn(run func() net.Conn) *MockConnection_Connection_Call
type MockConnection_Disconnect_Call ¶ added in v1.22.0
MockConnection_Disconnect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Disconnect'
func (*MockConnection_Disconnect_Call) Return ¶ added in v1.22.0
func (_c *MockConnection_Disconnect_Call) Return(_a0 error) *MockConnection_Disconnect_Call
func (*MockConnection_Disconnect_Call) Run ¶ added in v1.22.0
func (_c *MockConnection_Disconnect_Call) Run(run func()) *MockConnection_Disconnect_Call
func (*MockConnection_Disconnect_Call) RunAndReturn ¶ added in v1.22.0
func (_c *MockConnection_Disconnect_Call) RunAndReturn(run func() error) *MockConnection_Disconnect_Call
type MockConnection_Expecter ¶ added in v1.22.0
type MockConnection_Expecter struct {
// contains filtered or unexported fields
}
func (*MockConnection_Expecter) Connection ¶ added in v1.22.0
func (_e *MockConnection_Expecter) Connection() *MockConnection_Connection_Call
Connection is a helper method to define mock.On call
func (*MockConnection_Expecter) Disconnect ¶ added in v1.22.0
func (_e *MockConnection_Expecter) Disconnect() *MockConnection_Disconnect_Call
Disconnect is a helper method to define mock.On call
func (*MockConnection_Expecter) Send ¶ added in v1.22.0
func (_e *MockConnection_Expecter) Send(ctx interface{}, message interface{}) *MockConnection_Send_Call
Send is a helper method to define mock.On call
- ctx context.Context
- message *protobufs.ServerToAgent
type MockConnection_Send_Call ¶ added in v1.22.0
MockConnection_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send'
func (*MockConnection_Send_Call) Return ¶ added in v1.22.0
func (_c *MockConnection_Send_Call) Return(_a0 error) *MockConnection_Send_Call
func (*MockConnection_Send_Call) Run ¶ added in v1.22.0
func (_c *MockConnection_Send_Call) Run(run func(ctx context.Context, message *protobufs.ServerToAgent)) *MockConnection_Send_Call
func (*MockConnection_Send_Call) RunAndReturn ¶ added in v1.22.0
func (_c *MockConnection_Send_Call) RunAndReturn(run func(context.Context, *protobufs.ServerToAgent) error) *MockConnection_Send_Call
type MockConnections ¶
MockConnections is an autogenerated mock type for the Connections type
func NewMockConnections ¶
func NewMockConnections[S interface{}](t interface { mock.TestingT Cleanup(func()) }) *MockConnections[S]
NewMockConnections creates a new instance of MockConnections. 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 (*MockConnections[S]) Connected ¶
func (_m *MockConnections[S]) Connected(agentID string) bool
Connected provides a mock function with given fields: agentID
func (*MockConnections[S]) ConnectedAgentIDs ¶
func (_m *MockConnections[S]) ConnectedAgentIDs(_a0 context.Context) []string
ConnectedAgentIDs provides a mock function with given fields: _a0
func (*MockConnections[S]) ConnectedAgentsCount ¶
func (_m *MockConnections[S]) ConnectedAgentsCount(_a0 context.Context) int
ConnectedAgentsCount provides a mock function with given fields: _a0
func (*MockConnections[S]) OnConnecting ¶
func (_m *MockConnections[S]) OnConnecting(ctx context.Context, agentID string) S
OnConnecting provides a mock function with given fields: ctx, agentID
func (*MockConnections[S]) OnConnectionClose ¶
func (_m *MockConnections[S]) OnConnectionClose(conn types.Connection) (S, int)
OnConnectionClose provides a mock function with given fields: conn
func (*MockConnections[S]) OnMessage ¶
func (_m *MockConnections[S]) OnMessage(agentID string, conn types.Connection) (S, error)
OnMessage provides a mock function with given fields: agentID, conn
func (*MockConnections[S]) StateForAgentID ¶
func (_m *MockConnections[S]) StateForAgentID(agentID string) S
StateForAgentID provides a mock function with given fields: agentID
func (*MockConnections[S]) StateForConnection ¶
func (_m *MockConnections[S]) StateForConnection(_a0 types.Connection) S
StateForConnection provides a mock function with given fields: _a0