Documentation
¶
Overview ¶
Package realtime provides soft real-time primitives: fixed-timestep loop generators, timing wheels, and lock-free topics.
Index ¶
- Constants
- Variables
- func Bundle(_ map[string]string) core.Bundle
- func Library() action.Library
- func TickerSource() action.AnyStreamAction
- func TopicPublishAction() action.AnyAction
- func WheelAdvanceAction() action.AnyAction
- func WheelCancelAction() action.AnyAction
- func WheelScheduleAction() action.AnyAction
- type TicksReq
- type WheelScheduleReq
- type WheelScheduleRes
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 TickerSource ¶
func TickerSource() action.AnyStreamAction
TickerSource wraps the kernel's fixed-timestep stream.
func TopicPublishAction ¶
func WheelAdvanceAction ¶
func WheelCancelAction ¶
func WheelScheduleAction ¶
Types ¶
type WheelScheduleReq ¶
type WheelScheduleRes ¶
type WheelScheduleRes struct {
TimerID uint64 `json:"timer_id"`
}
Click to show internal directories.
Click to hide internal directories.