mocks

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	mock.Mock
}

Connection is an autogenerated mock type for the Connection type

func NewConnection

func NewConnection(t testing.TB) *Connection

NewConnection creates a new instance of Connection. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.

func (*Connection) RemoteAddr

func (_m *Connection) RemoteAddr() net.Addr

RemoteAddr provides a mock function with given fields:

func (*Connection) Send

func (_m *Connection) Send(ctx context.Context, message *protobufs.ServerToAgent) error

Send provides a mock function with given fields: ctx, message

type Manager

type Manager struct {
	mock.Mock
}

Manager is an autogenerated mock type for the Manager type

func NewManager

func NewManager(t testing.TB) *Manager

NewManager creates a new instance of Manager. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.

func (*Manager) Agent

func (_m *Manager) Agent(ctx context.Context, agentID string) (*model.Agent, error)

Agent provides a mock function with given fields: ctx, agentID

func (*Manager) AgentUpdates

func (_m *Manager) AgentUpdates(ctx context.Context, _a1 *model.Agent) (*server.AgentUpdates, error)

AgentUpdates provides a mock function with given fields: ctx, _a1

func (*Manager) AgentVersion added in v1.0.0

func (_m *Manager) AgentVersion(ctx context.Context, version string) (*model.AgentVersion, error)

AgentVersion provides a mock function with given fields: ctx, version

func (*Manager) EnableProtocol

func (_m *Manager) EnableProtocol(_a0 server.Protocol)

EnableProtocol provides a mock function with given fields: _a0

func (*Manager) RequestReport added in v1.1.0

func (_m *Manager) RequestReport(ctx context.Context, agentID string, configuration report.Configuration) error

RequestReport sends report configuration to the specified agent

func (*Manager) ResourceStore

func (_m *Manager) ResourceStore() model.ResourceStore

ResourceStore provides a mock function with given fields:

func (*Manager) Start

func (_m *Manager) Start(ctx context.Context)

Start provides a mock function with given fields: ctx

func (*Manager) UpsertAgent

func (_m *Manager) UpsertAgent(ctx context.Context, agentID string, updater store.AgentUpdater) (*model.Agent, error)

UpsertAgent provides a mock function with given fields: ctx, agentID, updater

func (*Manager) VerifySecretKey

func (_m *Manager) VerifySecretKey(ctx context.Context, secretKey string) bool

VerifySecretKey provides a mock function with given fields: ctx, secretKey

Jump to

Keyboard shortcuts

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