messages

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const LSLINK_KAFKA_TOPIC = "gobmp.parsed.ls_link_events"
View Source
const LSNODE_EDGE_KAFKA_TOPIC = "jalapeno.ls_node_edge_events"
View Source
const LSNODE_KAFKA_TOPIC = "gobmp.parsed.ls_node_events"
View Source
const LSPREFIX_KAFKA_TOPIC = "gobmp.parsed.ls_prefix_events"
View Source
const LSSRV6SID_KAFKA_TOPIC = "gobmp.parsed.ls_srv6_sid_events"
View Source
const (
	MeasurementIdentifier = "measurement"
)
View Source
const TELEMETRY_KAFKA_TOPIC = "jalapeno.telemetry"

Variables

View Source
var LsLinkEvents = make(chan KafkaEventMessage)
View Source
var LsLinkTopic *threadSafeTopic
View Source
var LsNodeEdgeEvents = make(chan KafkaEventMessage)
View Source
var LsNodeEdgeTopic *threadSafeTopic
View Source
var LsNodeEvents = make(chan KafkaEventMessage)
View Source
var LsNodeTopic *threadSafeTopic
View Source
var LsPrefixEvents = make(chan KafkaEventMessage)
View Source
var LsPrefixTopic *threadSafeTopic
View Source
var LsSrv6SidEvents = make(chan KafkaEventMessage)
View Source
var LsSrv6SidTopic *threadSafeTopic

Functions

func GetCacheServiceMessageHandlers added in v1.3.3

func GetCacheServiceMessageHandlers() map[string]MessageHandler

func GetSubscriptionServiceMessageHandlers added in v1.3.3

func GetSubscriptionServiceMessageHandlers() map[string]MessageHandler

func GetTelemetryTopic

func GetTelemetryTopic(measurement string) (*threadSafeTopic, error)

func InitializeTopics

func InitializeTopics()

func PublishTelemetry

func PublishTelemetry(measurement string, telemetryEvent TelemetryEvent)

func StartEventConsumption

func StartEventConsumption(topicHandlers map[string]MessageHandler)

func StartEventProcessing

func StartEventProcessing()

Types

type KafkaEventMessage

type KafkaEventMessage struct {
	TopicType int    `json:"TopicType,omitempty"`
	Key       string `json:"_key,omitempty"`
	Id        string `json:"_id,omitempty"`
	Action    string `json:"action,omitempty"`
}

type MessageHandler added in v1.3.3

type MessageHandler func(msg KafkaEventMessage)

type Subscription

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

func (*Subscription) Receive

func (subscription *Subscription) Receive(ctx context.Context, callback func(event *interface{}))

func (*Subscription) Unsubscribe

func (s *Subscription) Unsubscribe(logger *logrus.Entry)

type TelemetryEvent

type TelemetryEvent struct {
	Measurement string
	Metric      protocol.Metric
}

type TopologyEvent

type TopologyEvent struct {
	Action   string
	Key      string
	Document interface{}
}

Jump to

Keyboard shortcuts

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