Documentation ¶
Overview ¶
Package provider is a generated GoMock package.
Index ¶
- type MockNetworkCaptureProviderInterface
- func (m *MockNetworkCaptureProviderInterface) CaptureNetworkPacket(filter string, duration, maxSize int, sigChan <-chan os.Signal) error
- func (m *MockNetworkCaptureProviderInterface) Cleanup() error
- func (m *MockNetworkCaptureProviderInterface) CollectMetadata() error
- func (m *MockNetworkCaptureProviderInterface) EXPECT() *MockNetworkCaptureProviderInterfaceMockRecorder
- func (m *MockNetworkCaptureProviderInterface) Setup(filename file.CaptureFilename) (string, error)
- type MockNetworkCaptureProviderInterfaceMockRecorder
- func (mr *MockNetworkCaptureProviderInterfaceMockRecorder) CaptureNetworkPacket(filter, duration, maxSize, sigChan any) *gomock.Call
- func (mr *MockNetworkCaptureProviderInterfaceMockRecorder) Cleanup() *gomock.Call
- func (mr *MockNetworkCaptureProviderInterfaceMockRecorder) CollectMetadata() *gomock.Call
- func (mr *MockNetworkCaptureProviderInterfaceMockRecorder) Setup(filename any) *gomock.Call
- type NetworkCaptureProvider
- func (ncp *NetworkCaptureProvider) CaptureNetworkPacket(filter string, duration, maxSizeMB int, sigChan <-chan os.Signal) error
- func (ncp *NetworkCaptureProvider) Cleanup() error
- func (ncp *NetworkCaptureProvider) CollectMetadata() error
- func (ncp *NetworkCaptureProvider) Setup(filename file.CaptureFilename) (string, error)
- type NetworkCaptureProviderCommon
- type NetworkCaptureProviderInterface
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 ¶
func (m *MockNetworkCaptureProviderInterface) Cleanup() error
Cleanup mocks base method.
func (*MockNetworkCaptureProviderInterface) CollectMetadata ¶
func (m *MockNetworkCaptureProviderInterface) CollectMetadata() error
CollectMetadata mocks base method.
func (*MockNetworkCaptureProviderInterface) EXPECT ¶
func (m *MockNetworkCaptureProviderInterface) EXPECT() *MockNetworkCaptureProviderInterfaceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockNetworkCaptureProviderInterface) Setup ¶
func (m *MockNetworkCaptureProviderInterface) Setup(filename file.CaptureFilename) (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 any) *gomock.Call
CaptureNetworkPacket indicates an expected call of CaptureNetworkPacket.
func (*MockNetworkCaptureProviderInterfaceMockRecorder) Cleanup ¶
func (mr *MockNetworkCaptureProviderInterfaceMockRecorder) Cleanup() *gomock.Call
Cleanup indicates an expected call of Cleanup.
func (*MockNetworkCaptureProviderInterfaceMockRecorder) CollectMetadata ¶
func (mr *MockNetworkCaptureProviderInterfaceMockRecorder) CollectMetadata() *gomock.Call
CollectMetadata indicates an expected call of CollectMetadata.
type NetworkCaptureProvider ¶
type NetworkCaptureProvider struct { NetworkCaptureProviderCommon TmpCaptureDir string CaptureName string NodeHostName string StartTimestamp *file.Timestamp // contains filtered or unexported fields }
func (*NetworkCaptureProvider) CaptureNetworkPacket ¶
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 ¶
func (ncpc *NetworkCaptureProviderCommon) Setup(filename file.CaptureFilename) (string, error)
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