internal

package
v0.2.7-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Unix
	SIGABRT = 0x6
	SIGALRM = 0xe
	SIGHUP  = 0x1
	SIGILL  = 0x4
	SIGINT  = 0x2
	SIGKILL = 0x9
	SIGPWR  = 0x1e
	SIGQUIT = 0x3
	SIGSTOP = 0x13
	SIGTERM = 0xf
	SIGTRAP = 0x5
	SIGUSR1 = 0xa
	SIGUSR2 = 0xc
	// Windows
	WM_CLOSE = 0x10
)

Variables

This section is empty.

Functions

func DirExists

func DirExists(path string) error

func FileExists

func FileExists(path string) bool

func IntToSyscallSignal

func IntToSyscallSignal(sig int) syscall.Signal

func PIDExists added in v0.2.7

func PIDExists(pid int) bool

func QueryServices

func QueryServices(serviceName string) (map[string]*ServiceInfo, error)

func QueryServicesWithConfig

func QueryServicesWithConfig(serviceName string, config QueryConfig) (map[string]*ServiceInfo, error)

serviceName example: "_services._dns-sd._udp.local"

func SignalToString

func SignalToString(sig int) string

func StringToSignal

func StringToSignal(s string) (int, bool)

func ToMB

func ToMB(bytes float64) float64

Types

type DNSHeader

type DNSHeader struct {
	ID      uint16
	Flags   uint16
	QDCount uint16
	ANCount uint16
	NSCount uint16
	ARCount uint16
}

type DNSQuestion

type DNSQuestion struct {
	Name  string
	Type  uint16
	Class uint16
}

type QueryConfig

type QueryConfig struct {
	QueryTimeout  time.Duration // Total time to spend querying
	ReadTimeout   time.Duration // Timeout for individual read operations
	DetailTimeout time.Duration // Timeout for service detail queries
}

type ServiceInfo

type ServiceInfo struct {
	Name     string
	Hostname string
	Port     uint16
	Priority uint16
	Weight   uint16
	IPs      []string
	TXT      []string
}

Jump to

Keyboard shortcuts

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