process

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2023 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FindProcessAlways = "always"
	FindProcessStrict = "strict"
	FindProcessOff    = "off"
)
View Source
const (
	TCP = "tcp"
	UDP = "udp"
)
View Source
const (
	SOCK_DIAG_BY_FAMILY = 20
)

Variables

View Source
var (
	ErrInvalidNetwork     = errors.New("invalid network")
	ErrPlatformNotSupport = errors.New("not support on this platform")
	ErrNotFound           = errors.New("process not found")
)

Functions

func FindProcessName

func FindProcessName(network string, srcIP netip.Addr, srcPort int) (uint32, string, error)

Types

type FindProcessMode

type FindProcessMode string

func (FindProcessMode) Always

func (m FindProcessMode) Always() bool

func (FindProcessMode) Off

func (m FindProcessMode) Off() bool

func (*FindProcessMode) Set

func (m *FindProcessMode) Set(value string) error

func (*FindProcessMode) UnmarshalJSON

func (m *FindProcessMode) UnmarshalJSON(data []byte) error

func (*FindProcessMode) UnmarshalYAML

func (m *FindProcessMode) UnmarshalYAML(unmarshal func(any) error) error

Jump to

Keyboard shortcuts

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