EventDispatcher creates a new instance of services.EventDispatcher
()
| 722 | |
| 723 | // EventDispatcher creates a new instance of services.EventDispatcher |
| 724 | func (container *Container) EventDispatcher() (dispatcher *services.EventDispatcher) { |
| 725 | if container.eventDispatcher != nil { |
| 726 | return container.eventDispatcher |
| 727 | } |
| 728 | |
| 729 | container.logger.Debug(fmt.Sprintf("creating %T", dispatcher)) |
| 730 | dispatcher = services.NewEventDispatcher( |
| 731 | container.Logger(), |
| 732 | container.Tracer(), |
| 733 | container.Float64Histogram("event.publisher.duration", "ms", "measures the duration of processing CloudEvents"), |
| 734 | container.EventsQueue(), |
| 735 | container.EventsQueueConfiguration(), |
| 736 | ) |
| 737 | |
| 738 | container.eventDispatcher = dispatcher |
| 739 | return dispatcher |
| 740 | } |
| 741 | |
| 742 | // Float64Histogram creates a new instance of metric.Float64Histogram |
| 743 | func (container *Container) Float64Histogram(name, unit, description string) otelMetric.Float64Histogram { |
no test coverage detected