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(captureJobName, nodeHostname string) (string, error)
- type MockNetworkCaptureProviderInterfaceMockRecorder
- func (mr *MockNetworkCaptureProviderInterfaceMockRecorder) CaptureNetworkPacket(filter, duration, maxSize, sigChan interface{}) *gomock.Call
- func (mr *MockNetworkCaptureProviderInterfaceMockRecorder) Cleanup() *gomock.Call
- func (mr *MockNetworkCaptureProviderInterfaceMockRecorder) CollectMetadata() *gomock.Call
- func (mr *MockNetworkCaptureProviderInterfaceMockRecorder) Setup(captureJobName, nodeHostname interface{}) *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(captureName, nodeHostname string) (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.
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 ¶
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.
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 (*NetworkCaptureProvider) Cleanup ¶
func (ncp *NetworkCaptureProvider) Cleanup() error
func (*NetworkCaptureProvider) CollectMetadata ¶
func (ncp *NetworkCaptureProvider) CollectMetadata() 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()
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