Ejemplo n.º 1
0
func newStdoutEvent(pid uint64, text string, when time.Time) *rpc.Event {
	return rpc.NewEvent(StdoutEventType, &ProcessOutputEventBody{
		Timed: rpc.Timed{Time: when},
		Pid:   pid,
		Text:  text,
	})
}
Ejemplo n.º 2
0
func newStatusEvent(mp MachineProcess, status string) *rpc.Event {
	return rpc.NewEvent(status, &ProcessStatusEventBody{
		Timed:       rpc.Timed{Time: time.Now()},
		Pid:         mp.Pid,
		NativePid:   mp.NativePid,
		Name:        mp.Name,
		CommandLine: mp.CommandLine,
	})
}