Documentation ¶
Index ¶
- type MockConnection
- 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 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) RemoteAddr ¶
func (_m *MockConnection) RemoteAddr() net.Addr
RemoteAddr provides a mock function with given fields:
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 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