bus

package
v0.0.0-...-f9fb41f Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventBus

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

EventBus bus for data.Event type

func (*EventBus) Publish

func (eb *EventBus) Publish(e data.Event)

Publish publish to bus

func (*EventBus) PublishBlocking

func (eb *EventBus) PublishBlocking(e data.Event)

PublishBlocking publish to bus, but block until all application plugins process the data before publishing more events.

func (*EventBus) Subscribe

func (eb *EventBus) Subscribe(rf EventReceiveFunc)

Subscribe subscribe to bus

type EventPublishFunc

type EventPublishFunc func(data.Event)

EventPublishFunc function to for publishing to the event bus

type EventReceiveFunc

type EventReceiveFunc func(data.Event)

EventReceiveFunc callback type for receiving events from the event bus

type MetricBus

type MetricBus struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

MetricBus bus for data.Metric type

func (*MetricBus) Publish

func (mb *MetricBus) Publish(name string, time float64, mType data.MetricType, interval time.Duration, value float64, labelKeys []string, labelVals []string)

Publish publish to bus

func (*MetricBus) Subscribe

func (mb *MetricBus) Subscribe(rf MetricReceiveFunc)

Subscribe subscribe to bus

type MetricPublishFunc

type MetricPublishFunc func(string, float64, data.MetricType, time.Duration, float64, []string, []string)

MetricPublishFunc function type for publishing to the metric bus

type MetricReceiveFunc

type MetricReceiveFunc func(string, float64, data.MetricType, time.Duration, float64, []string, []string)

MetricReceiveFunc callback type for receiving metrics arguments are name, timestamp, metric type, interval, value, labels

Jump to

Keyboard shortcuts

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