centralhub

package
v0.0.0-...-b9bb202 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(origin names.Tag, metrics pubsub.Metrics) *pubsub.StructuredHub

New returns a new structured hub using yaml marshalling with an origin specified. The post processing ensures that the maps all have string keys so they messages can be marshalled between apiservers.

Types

type GaugeVec

type GaugeVec interface {
	prometheus.Collector
	With(prometheus.Labels) prometheus.Gauge
}

GaugeVec defines in place gauge used for testing.

type PubsubMetrics

type PubsubMetrics struct {
	// contains filtered or unexported fields
}

PubsubMetrics implements pubsub.Metrics for gaining information about the current work hub and it's subscribers are undertaking.

func NewPubsubMetrics

func NewPubsubMetrics() *PubsubMetrics

NewPubsubMetrics creates a new set of pubsub metrics for collecting information about the ongoing work for a given central hub.

func (*PubsubMetrics) Collect

func (m *PubsubMetrics) Collect(ch chan<- prometheus.Metric)

Collect is part of prometheus.Collector.

func (*PubsubMetrics) Consumed

func (m *PubsubMetrics) Consumed(ident string, duration time.Duration)

func (*PubsubMetrics) Dequeued

func (m *PubsubMetrics) Dequeued(ident string)

func (*PubsubMetrics) Describe

func (m *PubsubMetrics) Describe(ch chan<- *prometheus.Desc)

Describe is part of prometheus.Collector.

func (*PubsubMetrics) Enqueued

func (m *PubsubMetrics) Enqueued(ident string)

func (*PubsubMetrics) Published

func (m *PubsubMetrics) Published(topic string)

func (*PubsubMetrics) Subscribed

func (m *PubsubMetrics) Subscribed()

func (*PubsubMetrics) Unsubscribed

func (m *PubsubMetrics) Unsubscribed()

type PubsubNoOpMetrics

type PubsubNoOpMetrics struct{}

func (PubsubNoOpMetrics) Consumed

func (PubsubNoOpMetrics) Consumed(ident string, duration time.Duration)

func (PubsubNoOpMetrics) Dequeued

func (PubsubNoOpMetrics) Dequeued(ident string)

func (PubsubNoOpMetrics) Enqueued

func (PubsubNoOpMetrics) Enqueued(ident string)

func (PubsubNoOpMetrics) Published

func (PubsubNoOpMetrics) Published(topic string)

func (PubsubNoOpMetrics) Subscribed

func (PubsubNoOpMetrics) Subscribed()

func (PubsubNoOpMetrics) Unsubscribed

func (PubsubNoOpMetrics) Unsubscribed()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL