messaging

package
v0.0.0-...-cb80c53 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const ERR_Q = "error"
View Source
const GROUP = "horizon-service"
View Source
const IN_Q = "spots"
View Source
const OUT_Q = "horizons"
View Source
const STORE_NAME = "horizons"

Variables

This section is empty.

Functions

func Connect

func Connect() *nats.Conn

func EncodedConnection

func EncodedConnection(nc *nats.Conn) *nats.EncodedConn

func JetStream

func JetStream(nc *nats.Conn) nats.JetStreamContext

func KeyValueHorizon

func KeyValueHorizon(js nats.JetStreamContext) nats.KeyValue

Types

type Location

type Location struct {
	Lat float64 `json:"lat"`
	Lon float64 `json:"lon"`
}

type PartSubMessage

type PartSubMessage struct {
	Id uint `json:"id"`
	Of uint `json:"of"`
}

type SpotMessage

type SpotMessage struct {
	Part PartSubMessage `json:"part"`
	Spot SpotSubMessage `json:"spot"`
}

type SpotSubMessage

type SpotSubMessage struct {
	Dir  float64  `json:"dir"`
	Kind string   `json:"kind"`
	Loc  Location `json:"loc"`
}

Jump to

Keyboard shortcuts

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