Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type MuxWriter ¶
Example ¶
package main import ( "fmt" "os" "github.com/maidata/procfly/internal/process" ) func main() { pwf := process.NewMuxWriter(os.Stdout) prw1 := pwf.Writer("a") fmt.Fprint(prw1, "bc\ndef") fmt.Fprintln(prw1, "ghi") prw2 := pwf.Writer("ab") fmt.Fprintln(prw2, "jkl\nmno") fmt.Fprintln(prw1, "pqr") }
Output: a | bc a | def a | ghi ab | jkl ab | mno a | pqr
func NewMuxWriter ¶
type Supervisor ¶
type Supervisor interface { RegisterInit(string, Command) RegisterProcess(string, Command) RegisterReload(string, Command) // Run all of the supervisor's registered // commands Run() error // Run all of the supervisor's registered // reload scripts Reload() error // Log a message with the given prefix, using // the supervisor's multiplexed (prefixed) writer Log(name, message string) Logf(name, message string, args ...any) }
func NewSupervisor ¶
func NewSupervisor(ctx context.Context) Supervisor
Click to show internal directories.
Click to hide internal directories.