package errorbus import ( "context" ) // ErrorPublisher defines the interface for publishing errors to the error bus. type ErrorPublisher interface { // Publish publishes an error to the error bus. // The error will be logged and optionally reported to external services. Publish(ctx context.Context, err error) } // ErrorContext provides additional context for errors. type ErrorContext struct { RequestID string UserID string Component string Metadata map[string]interface{} }