provider

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package provider is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockNetworkCaptureProviderInterface

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

MockNetworkCaptureProviderInterface is a mock of NetworkCaptureProviderInterface interface.

func NewMockNetworkCaptureProviderInterface

func NewMockNetworkCaptureProviderInterface(ctrl *gomock.Controller) *MockNetworkCaptureProviderInterface

NewMockNetworkCaptureProviderInterface creates a new mock instance.

func (*MockNetworkCaptureProviderInterface) CaptureNetworkPacket

func (m *MockNetworkCaptureProviderInterface) CaptureNetworkPacket(filter string, duration, maxSize int, sigChan <-chan os.Signal) error

CaptureNetworkPacket mocks base method.

func (*MockNetworkCaptureProviderInterface) Cleanup

Cleanup mocks base method.

func (*MockNetworkCaptureProviderInterface) CollectMetadata

func (m *MockNetworkCaptureProviderInterface) CollectMetadata() error

CollectMetadata mocks base method.

func (*MockNetworkCaptureProviderInterface) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockNetworkCaptureProviderInterface) Setup

Setup mocks base method.

type MockNetworkCaptureProviderInterfaceMockRecorder

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

MockNetworkCaptureProviderInterfaceMockRecorder is the mock recorder for MockNetworkCaptureProviderInterface.

func (*MockNetworkCaptureProviderInterfaceMockRecorder) CaptureNetworkPacket

func (mr *MockNetworkCaptureProviderInterfaceMockRecorder) CaptureNetworkPacket(filter, duration, maxSize, sigChan any) *gomock.Call

CaptureNetworkPacket indicates an expected call of CaptureNetworkPacket.

func (*MockNetworkCaptureProviderInterfaceMockRecorder) Cleanup

Cleanup indicates an expected call of Cleanup.

func (*MockNetworkCaptureProviderInterfaceMockRecorder) CollectMetadata

CollectMetadata indicates an expected call of CollectMetadata.

func (*MockNetworkCaptureProviderInterfaceMockRecorder) Setup

Setup indicates an expected call of Setup.

type NetworkCaptureProvider

type NetworkCaptureProvider struct {
	NetworkCaptureProviderCommon
	TmpCaptureDir  string
	CaptureName    string
	NodeHostName   string
	StartTimestamp *file.Timestamp
	// contains filtered or unexported fields
}

func (*NetworkCaptureProvider) CaptureNetworkPacket

func (ncp *NetworkCaptureProvider) CaptureNetworkPacket(filter string, duration, maxSizeMB int, sigChan <-chan os.Signal) error

func (*NetworkCaptureProvider) Cleanup

func (ncp *NetworkCaptureProvider) Cleanup() error

func (*NetworkCaptureProvider) CollectMetadata

func (ncp *NetworkCaptureProvider) CollectMetadata() error

func (*NetworkCaptureProvider) Setup

func (ncp *NetworkCaptureProvider) Setup(filename file.CaptureFilename) (string, error)

type NetworkCaptureProviderCommon

type NetworkCaptureProviderCommon struct {
	TmpCaptureDir string
	// contains filtered or unexported fields
}

func (*NetworkCaptureProviderCommon) Cleanup

func (ncpc *NetworkCaptureProviderCommon) Cleanup()

func (*NetworkCaptureProviderCommon) Setup

type NetworkCaptureProviderInterface

type NetworkCaptureProviderInterface interface {
	// Setup prepares the provider with folder to store network capture for temporary.
	Setup(filename file.CaptureFilename) (string, error)
	// CaptureNetworkPacket capture network traffic per user input and store the captured network packets in local directory.
	CaptureNetworkPacket(filter string, duration, maxSize int, sigChan <-chan os.Signal) error
	// CollectMetadata collects network metadata and store network metadata info in local directory.
	CollectMetadata() error
	// Cleanup removes created resources.
	Cleanup() error
}

func NewNetworkCaptureProvider

func NewNetworkCaptureProvider(logger *log.ZapLogger) NetworkCaptureProviderInterface

Jump to

Keyboard shortcuts

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