pids

package
v0.4.158 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: ISC Imports: 4 Imported by: 0

Documentation

Overview

Package pids provides a typed process identifier.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pid

type Pid uint32

Pid is a unique named type for process identifiers

func ConvertToPid added in v0.4.139

func ConvertToPid[T constraints.Integer](pid T) (typedPid Pid, err error)

ConvertToPid returns a typed value process identifier from any Integer type

func NewPid

func NewPid(u32 uint32) (pid Pid)

NewPid returns a process identifier based on a 32-bit integer

func NewPid1

func NewPid1[T constraints.Integer](pid T) (typedPid Pid)

NewPid1 returns a typed value process identifier panicking on error

func (Pid) Int

func (pid Pid) Int() (pidInt int)

Int converts a process identifier to a platform-specific sized int

func (Pid) IsNonZero added in v0.4.38

func (pid Pid) IsNonZero() (isValid bool)

IsNonZero returns whether trhe process identifier contains a valid process ID

func (Pid) String

func (pid Pid) String() (s string)

func (Pid) Uint32

func (pid Pid) Uint32() (pidUint32 uint32)

Uint32 converts a process identifier to a 32-bit unsigned integer

Jump to

Keyboard shortcuts

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