provider

package
v0.0.1-pre Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 12 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

func (m *MockNetworkCaptureProviderInterface) Setup(captureJobName, nodeHostname string) (string, error)

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 interface{}) *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

func (mr *MockNetworkCaptureProviderInterfaceMockRecorder) Setup(captureJobName, nodeHostname interface{}) *gomock.Call

Setup indicates an expected call of Setup.

type NetworkCaptureProvider

type NetworkCaptureProvider struct {
	NetworkCaptureProviderCommon
	TmpCaptureDir string
	CaptureName   string
	NodeHostName  string
	// 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(captureName, nodeHostname string) (string, error)

type NetworkCaptureProviderCommon

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

func (*NetworkCaptureProviderCommon) CaptureNodetimestampName

func (ncpc *NetworkCaptureProviderCommon) CaptureNodetimestampName(captureName, nodeHostname string) string

captureNodetimestampName returns a unique name with the current UTC timestamp and provided variables.

func (*NetworkCaptureProviderCommon) Cleanup

func (ncpc *NetworkCaptureProviderCommon) Cleanup()

func (*NetworkCaptureProviderCommon) Setup

func (ncpc *NetworkCaptureProviderCommon) Setup(captureName, nodeHostname string) (string, error)

type NetworkCaptureProviderInterface

type NetworkCaptureProviderInterface interface {
	// Setup prepares the provider with folder to store network capture for temporary.
	Setup(captureJobName, nodeHostname string) (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