Plugins Ecosystem (goforge-plugins)
The goforge-plugins repository provides an experimental plugin surface alongside GoForge.
Early WIP Status
goforge-plugins is currently an early prototype (no go.mod or goforge CLI plugin installer yet). Only observability/ contains code today; auth/, cache/, graphql/, job-queue/, and scheduler/ are planned placeholders. For production user authentication today, use Limen (see Security & Authentication).
observability.Plugin Interface (observability/plugin.go)
go
type Plugin interface {
Name() string
Apply(engine *gin.Engine)
Shutdown(ctx context.Context) error
}OpenTelemetry Plugin (observability/otel/otel.go)
otel.New(otel.Config{ServiceName, OTLPEndpoint, MetricsPath})initializes anotlptracegrpcexporter +sdktrace.TracerProvider(readingOTEL_SERVICE_NAME,OTEL_EXPORTER_OTLP_ENDPOINT,OTEL_METRICS_PATH).Apply(engine)wraps requests withotelhttp.NewHandlerand registersGET <MetricsPath>(currently returns a placeholder metrics text stub until a Prometheus exporter is wired).- To obtain
*gin.Enginefromboot.App, iterateapp.Serversand type-assert*server.HTTPServer:
go
for _, srv := range app.Servers {
if httpSrv, ok := srv.(*server.HTTPServer); ok {
p.Apply(httpSrv.Engine())
}
}