notification

package
v0.5.21 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Basic notifications from the modules to the main service
	NotificationReady    = "NotificationReady"    // called when the module is ready to receive orders, i.e. after startup procedore, Publish to main
	NotificationUpdate   = "NotificationUpdate"   // called when the module has an update to share, i.e. update data or state, Publish to main
	NotificationShutdown = "NotificationShutdown" // called when the module shuts down themself
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Notification

type Notification struct {
	From         string // ID from who the message is. Module ID
	To           string // ID to who the message is. KiGo ID
	Notification string // what notification to publish, e.g. ready, update, render
	Payload      any
}

type NotificationReadyPayload

type NotificationReadyPayload struct {
	Duration  time.Duration // Duration needed to be ready, when should order startup be called
	Name      string        // Human readable name of the module, for debugging and logging purposes
	Changes   []string      // List of changes that the module has, e.g. update, render, etc. For debugging and logging purposes
	Heartbeat time.Duration // Duration between each heartbeat, for debugging and logging purposes
}

type NotificationUpdatePayload

type NotificationUpdatePayload struct {
	Type    int
	Payload any
}

Jump to

Keyboard shortcuts

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