mocks

package
v0.0.0-...-3d25219 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: GPL-3.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 MockBPFI

type MockBPFI struct {
	mock.Mock
}

MockBPFI is an autogenerated mock type for the BPFI type

func NewMockBPFI

func NewMockBPFI(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockBPFI

NewMockBPFI creates a new instance of MockBPFI. 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 (*MockBPFI) AttachGoUProbe

func (_m *MockBPFI) AttachGoUProbe(funcName string, exitFuncName string, probeFuncName string, binaryPath string) ([]*libbpfgo.BPFLink, error)

AttachGoUProbe provides a mock function with given fields: funcName, exitFuncName, probeFuncName, binaryPath

func (*MockBPFI) AttachKProbe

func (_m *MockBPFI) AttachKProbe(funcName string, probeFuncName string) (*libbpfgo.BPFLink, error)

AttachKProbe provides a mock function with given fields: funcName, probeFuncName

func (*MockBPFI) AttachKRetProbe

func (_m *MockBPFI) AttachKRetProbe(funcName string, probeFuncName string) (*libbpfgo.BPFLink, error)

AttachKRetProbe provides a mock function with given fields: funcName, probeFuncName

func (*MockBPFI) AttachUProbe

func (_m *MockBPFI) AttachUProbe(funcName string, probeFuncName string, binaryPath string) (*libbpfgo.BPFLink, error)

AttachUProbe provides a mock function with given fields: funcName, probeFuncName, binaryPath

func (*MockBPFI) AttachURetProbe

func (_m *MockBPFI) AttachURetProbe(funcName string, probeFuncName string, binaryPath string) (*libbpfgo.BPFLink, error)

AttachURetProbe provides a mock function with given fields: funcName, probeFuncName, binaryPath

func (*MockBPFI) Close

func (_m *MockBPFI) Close()

Close provides a mock function with given fields:

func (*MockBPFI) DestroyProbe

func (_m *MockBPFI) DestroyProbe(probe *libbpfgo.BPFLink) error

DestroyProbe provides a mock function with given fields: probe

func (*MockBPFI) EXPECT

func (_m *MockBPFI) EXPECT() *MockBPFI_Expecter

func (*MockBPFI) GetMap

func (_m *MockBPFI) GetMap(mapName string) (*libbpfgo.BPFMap, error)

GetMap provides a mock function with given fields: mapName

func (*MockBPFI) InitRingBuf

func (_m *MockBPFI) InitRingBuf(mapName string, eventsChan chan []byte) (*libbpfgo.RingBuffer, error)

InitRingBuf provides a mock function with given fields: mapName, eventsChan

func (*MockBPFI) LoadProgram

func (_m *MockBPFI) LoadProgram() error

LoadProgram provides a mock function with given fields:

type MockBPFI_AttachGoUProbe_Call

type MockBPFI_AttachGoUProbe_Call struct {
	*mock.Call
}

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

func (*MockBPFI_AttachGoUProbe_Call) Return

func (*MockBPFI_AttachGoUProbe_Call) Run

func (_c *MockBPFI_AttachGoUProbe_Call) Run(run func(funcName string, exitFuncName string, probeFuncName string, binaryPath string)) *MockBPFI_AttachGoUProbe_Call

func (*MockBPFI_AttachGoUProbe_Call) RunAndReturn

type MockBPFI_AttachKProbe_Call

type MockBPFI_AttachKProbe_Call struct {
	*mock.Call
}

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

func (*MockBPFI_AttachKProbe_Call) Return

func (*MockBPFI_AttachKProbe_Call) Run

func (_c *MockBPFI_AttachKProbe_Call) Run(run func(funcName string, probeFuncName string)) *MockBPFI_AttachKProbe_Call

func (*MockBPFI_AttachKProbe_Call) RunAndReturn

type MockBPFI_AttachKRetProbe_Call

type MockBPFI_AttachKRetProbe_Call struct {
	*mock.Call
}

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

func (*MockBPFI_AttachKRetProbe_Call) Return

func (*MockBPFI_AttachKRetProbe_Call) Run

func (_c *MockBPFI_AttachKRetProbe_Call) Run(run func(funcName string, probeFuncName string)) *MockBPFI_AttachKRetProbe_Call

func (*MockBPFI_AttachKRetProbe_Call) RunAndReturn

type MockBPFI_AttachUProbe_Call

type MockBPFI_AttachUProbe_Call struct {
	*mock.Call
}

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

func (*MockBPFI_AttachUProbe_Call) Return

func (*MockBPFI_AttachUProbe_Call) Run

func (_c *MockBPFI_AttachUProbe_Call) Run(run func(funcName string, probeFuncName string, binaryPath string)) *MockBPFI_AttachUProbe_Call

func (*MockBPFI_AttachUProbe_Call) RunAndReturn

type MockBPFI_AttachURetProbe_Call

type MockBPFI_AttachURetProbe_Call struct {
	*mock.Call
}

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

func (*MockBPFI_AttachURetProbe_Call) Return

func (*MockBPFI_AttachURetProbe_Call) Run

func (_c *MockBPFI_AttachURetProbe_Call) Run(run func(funcName string, probeFuncName string, binaryPath string)) *MockBPFI_AttachURetProbe_Call

func (*MockBPFI_AttachURetProbe_Call) RunAndReturn

type MockBPFI_Close_Call

type MockBPFI_Close_Call struct {
	*mock.Call
}

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

func (*MockBPFI_Close_Call) Return

func (*MockBPFI_Close_Call) Run

func (_c *MockBPFI_Close_Call) Run(run func()) *MockBPFI_Close_Call

func (*MockBPFI_Close_Call) RunAndReturn

func (_c *MockBPFI_Close_Call) RunAndReturn(run func()) *MockBPFI_Close_Call

type MockBPFI_DestroyProbe_Call

type MockBPFI_DestroyProbe_Call struct {
	*mock.Call
}

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

func (*MockBPFI_DestroyProbe_Call) Return

func (*MockBPFI_DestroyProbe_Call) Run

func (*MockBPFI_DestroyProbe_Call) RunAndReturn

type MockBPFI_Expecter

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

func (*MockBPFI_Expecter) AttachGoUProbe

func (_e *MockBPFI_Expecter) AttachGoUProbe(funcName interface{}, exitFuncName interface{}, probeFuncName interface{}, binaryPath interface{}) *MockBPFI_AttachGoUProbe_Call

AttachGoUProbe is a helper method to define mock.On call

  • funcName string
  • exitFuncName string
  • probeFuncName string
  • binaryPath string

func (*MockBPFI_Expecter) AttachKProbe

func (_e *MockBPFI_Expecter) AttachKProbe(funcName interface{}, probeFuncName interface{}) *MockBPFI_AttachKProbe_Call

AttachKProbe is a helper method to define mock.On call

  • funcName string
  • probeFuncName string

func (*MockBPFI_Expecter) AttachKRetProbe

func (_e *MockBPFI_Expecter) AttachKRetProbe(funcName interface{}, probeFuncName interface{}) *MockBPFI_AttachKRetProbe_Call

AttachKRetProbe is a helper method to define mock.On call

  • funcName string
  • probeFuncName string

func (*MockBPFI_Expecter) AttachUProbe

func (_e *MockBPFI_Expecter) AttachUProbe(funcName interface{}, probeFuncName interface{}, binaryPath interface{}) *MockBPFI_AttachUProbe_Call

AttachUProbe is a helper method to define mock.On call

  • funcName string
  • probeFuncName string
  • binaryPath string

func (*MockBPFI_Expecter) AttachURetProbe

func (_e *MockBPFI_Expecter) AttachURetProbe(funcName interface{}, probeFuncName interface{}, binaryPath interface{}) *MockBPFI_AttachURetProbe_Call

AttachURetProbe is a helper method to define mock.On call

  • funcName string
  • probeFuncName string
  • binaryPath string

func (*MockBPFI_Expecter) Close

Close is a helper method to define mock.On call

func (*MockBPFI_Expecter) DestroyProbe

func (_e *MockBPFI_Expecter) DestroyProbe(probe interface{}) *MockBPFI_DestroyProbe_Call

DestroyProbe is a helper method to define mock.On call

  • probe *libbpfgo.BPFLink

func (*MockBPFI_Expecter) GetMap

func (_e *MockBPFI_Expecter) GetMap(mapName interface{}) *MockBPFI_GetMap_Call

GetMap is a helper method to define mock.On call

  • mapName string

func (*MockBPFI_Expecter) InitRingBuf

func (_e *MockBPFI_Expecter) InitRingBuf(mapName interface{}, eventsChan interface{}) *MockBPFI_InitRingBuf_Call

InitRingBuf is a helper method to define mock.On call

  • mapName string
  • eventsChan chan []byte

func (*MockBPFI_Expecter) LoadProgram

func (_e *MockBPFI_Expecter) LoadProgram() *MockBPFI_LoadProgram_Call

LoadProgram is a helper method to define mock.On call

type MockBPFI_GetMap_Call

type MockBPFI_GetMap_Call struct {
	*mock.Call
}

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

func (*MockBPFI_GetMap_Call) Return

func (*MockBPFI_GetMap_Call) Run

func (_c *MockBPFI_GetMap_Call) Run(run func(mapName string)) *MockBPFI_GetMap_Call

func (*MockBPFI_GetMap_Call) RunAndReturn

func (_c *MockBPFI_GetMap_Call) RunAndReturn(run func(string) (*libbpfgo.BPFMap, error)) *MockBPFI_GetMap_Call

type MockBPFI_InitRingBuf_Call

type MockBPFI_InitRingBuf_Call struct {
	*mock.Call
}

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

func (*MockBPFI_InitRingBuf_Call) Return

func (*MockBPFI_InitRingBuf_Call) Run

func (_c *MockBPFI_InitRingBuf_Call) Run(run func(mapName string, eventsChan chan []byte)) *MockBPFI_InitRingBuf_Call

func (*MockBPFI_InitRingBuf_Call) RunAndReturn

func (_c *MockBPFI_InitRingBuf_Call) RunAndReturn(run func(string, chan []byte) (*libbpfgo.RingBuffer, error)) *MockBPFI_InitRingBuf_Call

type MockBPFI_LoadProgram_Call

type MockBPFI_LoadProgram_Call struct {
	*mock.Call
}

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

func (*MockBPFI_LoadProgram_Call) Return

func (*MockBPFI_LoadProgram_Call) Run

func (*MockBPFI_LoadProgram_Call) RunAndReturn

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

type MockBPFModuleI

type MockBPFModuleI struct {
	mock.Mock
}

MockBPFModuleI is an autogenerated mock type for the BPFModuleI type

func NewMockBPFModuleI

func NewMockBPFModuleI(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockBPFModuleI

NewMockBPFModuleI creates a new instance of MockBPFModuleI. 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 (*MockBPFModuleI) BPFLoadObject

func (_m *MockBPFModuleI) BPFLoadObject() error

BPFLoadObject provides a mock function with given fields:

func (*MockBPFModuleI) Close

func (_m *MockBPFModuleI) Close()

Close provides a mock function with given fields:

func (*MockBPFModuleI) EXPECT

func (*MockBPFModuleI) GetMap

func (_m *MockBPFModuleI) GetMap(mapName string) (*libbpfgo.BPFMap, error)

GetMap provides a mock function with given fields: mapName

func (*MockBPFModuleI) GetProgram

func (_m *MockBPFModuleI) GetProgram(progName string) (*libbpfgo.BPFProg, error)

GetProgram provides a mock function with given fields: progName

func (*MockBPFModuleI) InitRingBuf

func (_m *MockBPFModuleI) InitRingBuf(mapName string, eventsChan chan []byte) (*libbpfgo.RingBuffer, error)

InitRingBuf provides a mock function with given fields: mapName, eventsChan

type MockBPFModuleI_BPFLoadObject_Call

type MockBPFModuleI_BPFLoadObject_Call struct {
	*mock.Call
}

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

func (*MockBPFModuleI_BPFLoadObject_Call) Return

func (*MockBPFModuleI_BPFLoadObject_Call) Run

func (*MockBPFModuleI_BPFLoadObject_Call) RunAndReturn

type MockBPFModuleI_Close_Call

type MockBPFModuleI_Close_Call struct {
	*mock.Call
}

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

func (*MockBPFModuleI_Close_Call) Return

func (*MockBPFModuleI_Close_Call) Run

func (*MockBPFModuleI_Close_Call) RunAndReturn

func (_c *MockBPFModuleI_Close_Call) RunAndReturn(run func()) *MockBPFModuleI_Close_Call

type MockBPFModuleI_Expecter

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

func (*MockBPFModuleI_Expecter) BPFLoadObject

BPFLoadObject is a helper method to define mock.On call

func (*MockBPFModuleI_Expecter) Close

Close is a helper method to define mock.On call

func (*MockBPFModuleI_Expecter) GetMap

func (_e *MockBPFModuleI_Expecter) GetMap(mapName interface{}) *MockBPFModuleI_GetMap_Call

GetMap is a helper method to define mock.On call

  • mapName string

func (*MockBPFModuleI_Expecter) GetProgram

func (_e *MockBPFModuleI_Expecter) GetProgram(progName interface{}) *MockBPFModuleI_GetProgram_Call

GetProgram is a helper method to define mock.On call

  • progName string

func (*MockBPFModuleI_Expecter) InitRingBuf

func (_e *MockBPFModuleI_Expecter) InitRingBuf(mapName interface{}, eventsChan interface{}) *MockBPFModuleI_InitRingBuf_Call

InitRingBuf is a helper method to define mock.On call

  • mapName string
  • eventsChan chan []byte

type MockBPFModuleI_GetMap_Call

type MockBPFModuleI_GetMap_Call struct {
	*mock.Call
}

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

func (*MockBPFModuleI_GetMap_Call) Return

func (*MockBPFModuleI_GetMap_Call) Run

func (_c *MockBPFModuleI_GetMap_Call) Run(run func(mapName string)) *MockBPFModuleI_GetMap_Call

func (*MockBPFModuleI_GetMap_Call) RunAndReturn

type MockBPFModuleI_GetProgram_Call

type MockBPFModuleI_GetProgram_Call struct {
	*mock.Call
}

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

func (*MockBPFModuleI_GetProgram_Call) Return

func (*MockBPFModuleI_GetProgram_Call) Run

func (*MockBPFModuleI_GetProgram_Call) RunAndReturn

type MockBPFModuleI_InitRingBuf_Call

type MockBPFModuleI_InitRingBuf_Call struct {
	*mock.Call
}

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

func (*MockBPFModuleI_InitRingBuf_Call) Return

func (*MockBPFModuleI_InitRingBuf_Call) Run

func (_c *MockBPFModuleI_InitRingBuf_Call) Run(run func(mapName string, eventsChan chan []byte)) *MockBPFModuleI_InitRingBuf_Call

func (*MockBPFModuleI_InitRingBuf_Call) RunAndReturn

type MockContainersI

type MockContainersI struct {
	mock.Mock
}

MockContainersI is an autogenerated mock type for the ContainersI type

func NewMockContainersI

func NewMockContainersI(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockContainersI

NewMockContainersI creates a new instance of MockContainersI. 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 (*MockContainersI) EXPECT

func (*MockContainersI) GetContainersToIntercept

func (_m *MockContainersI) GetContainersToIntercept() map[string]docker.Container

GetContainersToIntercept provides a mock function with given fields:

func (*MockContainersI) GetProcsToIntercept

func (_m *MockContainersI) GetProcsToIntercept() map[uint32]docker.Proc

GetProcsToIntercept provides a mock function with given fields:

type MockContainersI_Expecter

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

func (*MockContainersI_Expecter) GetContainersToIntercept

GetContainersToIntercept is a helper method to define mock.On call

func (*MockContainersI_Expecter) GetProcsToIntercept

GetProcsToIntercept is a helper method to define mock.On call

type MockContainersI_GetContainersToIntercept_Call

type MockContainersI_GetContainersToIntercept_Call struct {
	*mock.Call
}

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

func (*MockContainersI_GetContainersToIntercept_Call) Return

func (*MockContainersI_GetContainersToIntercept_Call) Run

func (*MockContainersI_GetContainersToIntercept_Call) RunAndReturn

type MockContainersI_GetProcsToIntercept_Call

type MockContainersI_GetProcsToIntercept_Call struct {
	*mock.Call
}

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

func (*MockContainersI_GetProcsToIntercept_Call) Return

func (*MockContainersI_GetProcsToIntercept_Call) Run

func (*MockContainersI_GetProcsToIntercept_Call) RunAndReturn

Jump to

Keyboard shortcuts

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