mock

package
v0.0.0-rc8 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentMock

type AgentMock struct {
	mock.Mock
}

AgentMock is an autogenerated mock type for the Agent type

func NewAgentMock

func NewAgentMock(t interface {
	mock.TestingT
	Cleanup(func())
}) *AgentMock

NewAgentMock creates a new instance of AgentMock. 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 (*AgentMock) Close

func (_m *AgentMock) Close() error

Close provides a mock function with given fields:

func (*AgentMock) EXPECT

func (_m *AgentMock) EXPECT() *AgentMock_Expecter

func (*AgentMock) Publish

func (_m *AgentMock) Publish(ctx context.Context, topic string, msg interface{}) error

Publish provides a mock function with given fields: ctx, topic, msg

func (*AgentMock) Subscribe

func (_m *AgentMock) Subscribe(ctx context.Context, topics ...string) (<-chan pubsub.Event, error)

Subscribe provides a mock function with given fields: ctx, topics

type AgentMock_Close_Call

type AgentMock_Close_Call struct {
	*mock.Call
}

AgentMock_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'

func (*AgentMock_Close_Call) Return

func (*AgentMock_Close_Call) Run

func (_c *AgentMock_Close_Call) Run(run func()) *AgentMock_Close_Call

func (*AgentMock_Close_Call) RunAndReturn

func (_c *AgentMock_Close_Call) RunAndReturn(run func() error) *AgentMock_Close_Call

type AgentMock_Expecter

type AgentMock_Expecter struct {
	// contains filtered or unexported fields
}

func (*AgentMock_Expecter) Close

Close is a helper method to define mock.On call

func (*AgentMock_Expecter) Publish

func (_e *AgentMock_Expecter) Publish(ctx interface{}, topic interface{}, msg interface{}) *AgentMock_Publish_Call

Publish is a helper method to define mock.On call

  • ctx context.Context
  • topic string
  • msg interface{}

func (*AgentMock_Expecter) Subscribe

func (_e *AgentMock_Expecter) Subscribe(ctx interface{}, topics ...interface{}) *AgentMock_Subscribe_Call

Subscribe is a helper method to define mock.On call

  • ctx context.Context
  • topics ...string

type AgentMock_Publish_Call

type AgentMock_Publish_Call struct {
	*mock.Call
}

AgentMock_Publish_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Publish'

func (*AgentMock_Publish_Call) Return

func (*AgentMock_Publish_Call) Run

func (_c *AgentMock_Publish_Call) Run(run func(ctx context.Context, topic string, msg interface{})) *AgentMock_Publish_Call

func (*AgentMock_Publish_Call) RunAndReturn

func (_c *AgentMock_Publish_Call) RunAndReturn(run func(context.Context, string, interface{}) error) *AgentMock_Publish_Call

type AgentMock_Subscribe_Call

type AgentMock_Subscribe_Call struct {
	*mock.Call
}

AgentMock_Subscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Subscribe'

func (*AgentMock_Subscribe_Call) Return

func (*AgentMock_Subscribe_Call) Run

func (_c *AgentMock_Subscribe_Call) Run(run func(ctx context.Context, topics ...string)) *AgentMock_Subscribe_Call

func (*AgentMock_Subscribe_Call) RunAndReturn

func (_c *AgentMock_Subscribe_Call) RunAndReturn(run func(context.Context, ...string) (<-chan pubsub.Event, error)) *AgentMock_Subscribe_Call

Jump to

Keyboard shortcuts

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