Versions in this module Expand all Collapse all v0 v0.1.0 Mar 15, 2026 Changes in this version + func CheckEnv[T any](key string, v T) any + func ETReadFileFn(ctx context.Context, p *Process) func() + func NewUUID() string + func RegisterProcessesInESProcesses(p *Process, pi *registerProcessInfo) + type Buffer struct + func NewBuffer() *Buffer + func (bu *Buffer) Read(p []byte) (int, error) + func (bu *Buffer) Write(b []byte) (int, error) + type Config struct + CustomEvents bool + CustomEventsPath string + LogLevel string + Metrics bool + NodeName Node + func NewConfig(logLevel string) (*Config, *flag.FlagSet) + type ESProcessesMap map[EventName]string + type ETFunc func(context.Context, *Process) func() + func EDSyncFn(syncCh chan struct{}) ETFunc + func ETTestfn(testCh chan string) ETFunc + type Event struct + Cmd []string + Data []byte + DstNode Node + Err error + Instruction Instruction + InternalCh chan chan []byte + Name EventName + NextEvent *Event + Nr int + PreviousEvent *Event + SrcNode Node + func CopyEventFields(ev *Event) *Event + func NewEvent(et EventName, opts ...EventOpt) *Event + type EventName string + const ECGeneralDelivery + const ECRouter + const EDRouter + const EDSync + const ERLog + const ERNone + const ERRouter + const ERTest + const ESProcesses + const ESRouter + const ETDone + const ETExit + const ETOsSignal + const ETPid + const ETPidGetAll + const ETPrint + const ETReadFile + const ETRemote + const ETRoot + const ETRouter + const ETTest + const ETTestCh + type EventOpt func(*Event) + func EVData(b []byte) EventOpt + func EvCmd(cmd []string) EventOpt + func EvNext(nev *Event) EventOpt + type EventRW struct + Ev *Event + Info string + P *Process + Pos int + func NewEventRW(p *Process, ev *Event, info string) *EventRW + func (m *EventRW) Read(b []byte) (int, error) + func (m *EventRW) Write(b []byte) (int, error) + type Instruction string + const InstructionCmdEOF + const InstructionDebug + const InstructionESProcessesAdd + const InstructionESProcessesDelete + const InstructionESProcessesGetAll + const InstructionError + const InstructionFatal + const InstructionInfo + type Node string + type PidVsProcMap map[pidnr]*Process + type Process struct + Cancel context.CancelFunc + Config *Config + Ctx context.Context + CustomEventCh chan Event + CustomProcesses *customProcesses + DynamicEventCh chan Event + DynamicProcesses *dynamicProcesses + ErrorEventCh chan Event + ErrorProcesses *errorProcesses + Event EventName + EventNr *eventNr + InCh chan Event + PID pidnr + StaticEventCh chan Event + StaticProcesses *staticProcesses + SupervisorEventCh chan Event + TestCh chan Event + func NewProcess(ctx context.Context, parentP *Process, event EventName, fn ETFunc) *Process + func NewRootProcess(ctx context.Context, fn ETFunc, conf *Config) *Process + func (p *Process) Act() error + func (p *Process) AddEvent(event Event) + func (p *Process) CurrentEventNr() int + func (p *Process) IncrementEventNr() int + func (p *Process) SignalReady() + func (p *Process) Stop() error + func (p *Process) WaitForReady()