mocks

package
v1.26.2 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockProtocol

type MockProtocol struct {
	mock.Mock
}

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

type MockProtocol_ConnectedAgentIDs_Call struct {
	*mock.Call
}

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 (*MockProtocol_ConnectedAgentIDs_Call) Run added in v1.22.0

func (*MockProtocol_ConnectedAgentIDs_Call) RunAndReturn added in v1.22.0

type MockProtocol_Connected_Call added in v1.22.0

type MockProtocol_Connected_Call struct {
	*mock.Call
}

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 (*MockProtocol_Connected_Call) Run added in v1.22.0

func (*MockProtocol_Connected_Call) RunAndReturn added in v1.22.0

type MockProtocol_Disconnect_Call added in v1.22.0

type MockProtocol_Disconnect_Call struct {
	*mock.Call
}

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 (*MockProtocol_Disconnect_Call) Run added in v1.22.0

func (*MockProtocol_Disconnect_Call) RunAndReturn added in v1.22.0

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

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

type MockProtocol_Name_Call struct {
	*mock.Call
}

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 (*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

type MockProtocol_ReportConnectedAgents_Call struct {
	*mock.Call
}

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 (*MockProtocol_ReportConnectedAgents_Call) Run added in v1.23.0

func (*MockProtocol_ReportConnectedAgents_Call) RunAndReturn added in v1.23.0

type MockProtocol_RequestReport_Call added in v1.22.0

type MockProtocol_RequestReport_Call struct {
	*mock.Call
}

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 (*MockProtocol_RequestReport_Call) Run added in v1.22.0

func (*MockProtocol_RequestReport_Call) RunAndReturn added in v1.22.0

type MockProtocol_SendHeartbeat_Call added in v1.22.0

type MockProtocol_SendHeartbeat_Call struct {
	*mock.Call
}

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 (*MockProtocol_SendHeartbeat_Call) Run added in v1.22.0

func (*MockProtocol_SendHeartbeat_Call) RunAndReturn added in v1.22.0

type MockProtocol_Shutdown_Call added in v1.22.0

type MockProtocol_Shutdown_Call struct {
	*mock.Call
}

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 (*MockProtocol_Shutdown_Call) Run added in v1.22.0

func (*MockProtocol_Shutdown_Call) RunAndReturn added in v1.22.0

type MockProtocol_UpdateAgent_Call added in v1.22.0

type MockProtocol_UpdateAgent_Call struct {
	*mock.Call
}

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 (*MockProtocol_UpdateAgent_Call) Run added in v1.22.0

func (*MockProtocol_UpdateAgent_Call) RunAndReturn added in v1.22.0

Jump to

Keyboard shortcuts

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