// process.go is a thin re-export and compatibility shim for the shared // pipeline (internal/pipeline/). All the actual logic lives in pipeline/. // This file exists so that existing callers in package main (http.go, // mqtt.go, ws.go, main.go) that reference types by their package-main // names don't need to change. package main import ( "context" pipeline "git3.techno-world.net/lrosales/broad-announce/internal/pipeline" ) // SourceConfig is re-exported from pipeline so callers in package main // (ws.go, mqtt.go, loadSourcesFromEnv) can use it without an import. type SourceConfig = pipeline.SourceConfig // Result is re-exported for backward compatibility. type Result = pipeline.Result // Accept is re-exported for backward compatibility. func Accept(id string, count uint32, isNew bool) Result { return pipeline.Accept(id, count, isNew) } // Reject is re-exported for backward compatibility. func Reject(reason string, status int, detail string) Result { return pipeline.Reject(reason, status, detail) } // processDeps embeds pipeline.Deps and adds ProcessAlert as a thin // compatibility wrapper so existing callers (http.go, mqtt.go, ws.go) // don't need to change their call sites. type processDeps struct{ pipeline.Deps } // ProcessAlert is the legacy entry point. It delegates to the embedded // pipeline.Deps.Process, which has the same signature. func (d *processDeps) ProcessAlert(ctx context.Context, body []byte, sigHeader string) Result { return d.Process(ctx, body, sigHeader) }