ipresolver

package
v0.0.0-...-b5acc33 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const MaxRetries = 3

Variables

This section is empty.

Functions

This section is empty.

Types

type IPResolver

type IPResolver interface {
	Refresh() error
	ResolveIP(ipaddr string) (hostname string, err error)
}

type MockIPResolver

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

MockMapperClient is a mock of IPResolver interface.

func NewMockIPResolver

func NewMockIPResolver(ctrl *gomock.Controller) *MockIPResolver

NewMockIPResolver creates a new mock instance.

func (*MockIPResolver) EXPECT

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

func (*MockIPResolver) Refresh

func (m *MockIPResolver) Refresh() error

Refresh mocks base method.

func (*MockIPResolver) ResolveIP

func (m *MockIPResolver) ResolveIP(ipaddr string) (string, error)

ResolveIP mocks base method.

type MockIPResolverMockRecorder

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

MockMapperClientMockRecorder is the mock recorder for MockMapperClient.

func (*MockIPResolverMockRecorder) Refresh

func (mr *MockIPResolverMockRecorder) Refresh() *gomock.Call

ReportCaptureResults indicates an expected call of ReportCaptureResults.

func (*MockIPResolverMockRecorder) ResolveIP

func (mr *MockIPResolverMockRecorder) ResolveIP(ipaddr interface{}) *gomock.Call

ResolveIP indicates an expected call of ResolveIP.

type ProcFSIPResolver

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

func NewProcFSIPResolver

func NewProcFSIPResolver() *ProcFSIPResolver

func (*ProcFSIPResolver) Refresh

func (r *ProcFSIPResolver) Refresh() error

func (*ProcFSIPResolver) ResolveIP

func (r *ProcFSIPResolver) ResolveIP(ipaddr string) (hostname string, err error)

type ProcFSIPResolverEntry

type ProcFSIPResolverEntry struct {
	IPAddr          string
	Hostname        string
	ProcessRefCount int
}

type ProcessMonitor

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

func NewProcessMonitor

func NewProcessMonitor(
	onProcNew ProcessMonitorCallback,
	onProcExit ProcessMonitorCallback,
	forEachProcess utils.ProcessScanner,
) *ProcessMonitor

func (*ProcessMonitor) Poll

func (pm *ProcessMonitor) Poll() error

type ProcessMonitorCallback

type ProcessMonitorCallback func(pid int64, pDir string) error

ProcessMonitorCallback Should be idempotent on failures because retried on error

Jump to

Keyboard shortcuts

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