realtime

package
v0.80.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package realtime provides soft real-time primitives: fixed-timestep loop generators, timing wheels, and lock-free topics.

Index

Constants

View Source
const ID = "realtime"

Variables

View Source
var TopicKey = xctx.NewKey[interface{ Publish(any) }]("realtime.topic")

TopicKey provides the lock-free broadcast channel for the current room.

View Source
var WheelKey = xctx.NewKey[*timing.Wheel]("realtime.wheel")

WheelKey provides the game loop's timing wheel.

Functions

func Bundle

func Bundle(_ map[string]string) compiler.Bundle

func Library

func Library() action.Library

func TickerSource

func TickerSource() action.AnyStreamAction

TickerSource wraps the kernel's fixed-timestep stream.

func TopicPublishAction

func TopicPublishAction() action.AnyAction

func WheelAdvanceAction

func WheelAdvanceAction() action.AnyAction

func WheelCancelAction

func WheelCancelAction() action.AnyAction

func WheelScheduleAction

func WheelScheduleAction() action.AnyAction

Types

type TicksReq

type TicksReq struct {
	Hz           int `json:"hz"`
	MaxCatchupMs int `json:"max_catchup_ms"`
}

type WheelScheduleReq

type WheelScheduleReq struct {
	DelayMs int64 `json:"delay_ms"`
	Payload any   `json:"payload"`
}

type WheelScheduleRes

type WheelScheduleRes struct {
	TimerID uint64 `json:"timer_id"`
}

Jump to

Keyboard shortcuts

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