qos

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

package qos provides the functionality required for messaging (seriliaizing, sharing, etc...) QoS data between multiple PATH instances.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessagePlatform

type MessagePlatform interface {
	Publish(topic string, data []byte) error
	Subscribe(topic string) <-chan []byte
}

TODO_MVP(@adshmh): implement the MessagePlatform interface in a separate package, using NATS or REDIS. MessagePlatform is used to: A) Publish QoS observation sets for sharing with other PATH instances, and B) Receive, through subscription to a topic, QoS observation sets shared by other PATH instances

type Messenger

type Messenger struct {
	MessagePlatform
	Services map[protocol.ServiceID]ServiceQoS
	Logger   polylog.Logger
}

func (*Messenger) Publish

func (m *Messenger) Publish(observationSet message.ObservationSet) error

func (*Messenger) Start

func (m *Messenger) Start() error

type ObservationSetMessage

type ObservationSetMessage struct {
	protocol.ServiceID `json:"service_id"`
	Payload            []byte `json:"payload"`
}

ObservationSetMessage is the expected format of QoS messages shared between multiple PATH instances, using the provided MessagePlatform

type ServiceQoS

type ServiceQoS interface {
	message.Unmarshaller
}

Jump to

Keyboard shortcuts

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