Documentation
¶
Index ¶
Constants ¶
View Source
const (
QueueMetricsSubsystem = "queue_observer"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncReader ¶
type AsyncReader[T any] struct { // contains filtered or unexported fields }
func NewAsyncReader ¶
func NewAsyncReader[T any](ch <-chan T) *AsyncReader[T]
func (*AsyncReader[T]) Read ¶
func (cr *AsyncReader[T]) Read() []T
type FanOut ¶
type FanOut[T any] struct { // contains filtered or unexported fields }
func (*FanOut[T]) Unsubscribe ¶
func (b *FanOut[T]) Unsubscribe(channel <-chan T)
func (*FanOut[T]) WithMetrics ¶
func (b *FanOut[T]) WithMetrics(metrics *QueueMetrics) *FanOut[T]
func (*FanOut[T]) WithQueueSize ¶
type FanOutChan ¶
type FanOutChan[T any] struct { // contains filtered or unexported fields }
func NewChanBroadcaster ¶
func NewChanBroadcaster[T any](ctx context.Context, name string, source <-chan (chan T)) *FanOutChan[T]
func (*FanOutChan[T]) Run ¶
func (b *FanOutChan[T]) Run() *FanOutChan[T]
func (*FanOutChan[T]) Subscribe ¶
func (b *FanOutChan[T]) Subscribe() <-chan (<-chan T)
func (*FanOutChan[T]) Unsubscribe ¶
func (b *FanOutChan[T]) Unsubscribe(channel chan (<-chan T))
func (*FanOutChan[T]) WithMetrics ¶
func (b *FanOutChan[T]) WithMetrics(metrics *QueueMetrics) *FanOutChan[T]
func (*FanOutChan[T]) WithQueueSize ¶
func (b *FanOutChan[T]) WithQueueSize(size int) *FanOutChan[T]
type QueueMetrics ¶
type QueueMetrics struct {
ObserverSubscribed *prometheus.GaugeVec
ObserverReadCount *prometheus.CounterVec
ObserverWriteCount *prometheus.CounterVec
ObserverWriteFullCount *prometheus.CounterVec
}
func NewQueueMetrics ¶
func NewQueueMetrics() *QueueMetrics
Click to show internal directories.
Click to hide internal directories.