netns

package
v0.0.0-...-1e8dc9b Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2024 Datadog, Inc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	Enter() error
	Exit() error
}

Manager is an interface being able to interact with a process network namespace

func NewManager

func NewManager(log *zap.SugaredLogger, pid uint32) (Manager, error)

NewManager creates a new network namespace manager for the given PID

type ManagerMock

type ManagerMock struct {
	mock.Mock
}

ManagerMock is an autogenerated mock type for the Manager type

func NewManagerMock

func NewManagerMock(t interface {
	mock.TestingT
	Cleanup(func())
}) *ManagerMock

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

func (_m *ManagerMock) EXPECT() *ManagerMock_Expecter

func (*ManagerMock) Enter

func (_m *ManagerMock) Enter() error

Enter provides a mock function with given fields:

func (*ManagerMock) Exit

func (_m *ManagerMock) Exit() error

Exit provides a mock function with given fields:

type ManagerMock_Enter_Call

type ManagerMock_Enter_Call struct {
	*mock.Call
}

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

func (*ManagerMock_Enter_Call) Return

func (*ManagerMock_Enter_Call) Run

func (_c *ManagerMock_Enter_Call) Run(run func()) *ManagerMock_Enter_Call

func (*ManagerMock_Enter_Call) RunAndReturn

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

type ManagerMock_Exit_Call

type ManagerMock_Exit_Call struct {
	*mock.Call
}

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

func (*ManagerMock_Exit_Call) Return

func (*ManagerMock_Exit_Call) Run

func (_c *ManagerMock_Exit_Call) Run(run func()) *ManagerMock_Exit_Call

func (*ManagerMock_Exit_Call) RunAndReturn

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

type ManagerMock_Expecter

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

func (*ManagerMock_Expecter) Enter

Enter is a helper method to define mock.On call

func (*ManagerMock_Expecter) Exit

Exit is a helper method to define mock.On call

Jump to

Keyboard shortcuts

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