Documentation ¶
Index ¶
- func Sniffing(ctx context.Context, dog Dog, sleeper Sleeper, resultChannel chan bool)
- func WaitSniffResult(ctx context.Context, dog Dog, sleeper Sleeper, result bool) chan interface{}
- func WaitSniffed(ctx context.Context, dog Dog, sleeper Sleeper) chan interface{}
- func WaitUnSniffed(ctx context.Context, dog Dog, sleeper Sleeper) chan interface{}
- type Dog
- type Keeper
- type ProcessAliveDog
- type Sleeper
- type SniffedEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WaitSniffResult ¶
WaitSniffResult keeps sniffing until expected result received.
func WaitSniffed ¶
WaitSniffed keeps sniffing until sniffed.
Types ¶
type Keeper ¶
type Keeper struct { Cancel context.CancelFunc // contains filtered or unexported fields }
Keeper runs and collects SniffedEvents of multi-dogs.
func NewKeeper ¶
func NewKeeper() *Keeper
NewKeeper returns a new Keeper for keeping amount of dogs.
type ProcessAliveDog ¶
type ProcessAliveDog struct {
Pid int
}
ProcessAliveDog for checking if process is alive or not via its Pid.
func NewProcessAliveDog ¶
func NewProcessAliveDog(pid int) *ProcessAliveDog
NewProcessAliveDog creates a ProcessAliveDog via the Pid of a process it is watching.
func (ProcessAliveDog) Sniff ¶
func (dog ProcessAliveDog) Sniff() bool
Sniff checks if process is alive or not via its Pid.
type SniffedEvent ¶
SniffedEvent represents the Dog.Sniff() result of specific Dog.
Click to show internal directories.
Click to hide internal directories.