mocks

package
v1.24.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockConnection

type MockConnection struct {
	mock.Mock
}

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

type MockConnections[S interface{}] struct {
	mock.Mock
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL