memory

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryRealtimeBus

type MemoryRealtimeBus struct {
	// contains filtered or unexported fields
}

MemoryRealtimeBus is an in-process fan-out bus. Every subscriber to a topic receives a copy of every published message. It is single-node only and non-durable, which is exactly the right model for low-latency GraphQL subscriptions on a single engine instance.

func GetMemoryRealtimeBus

func GetMemoryRealtimeBus(_ *models.Config) (*MemoryRealtimeBus, error)

GetMemoryRealtimeBus returns an in-process realtime bus.

func (*MemoryRealtimeBus) Close

func (b *MemoryRealtimeBus) Close() error

Close marks the bus closed; subscriber channels close via their ctx.

func (*MemoryRealtimeBus) Publish

func (b *MemoryRealtimeBus) Publish(_ context.Context, topic string, payload []byte) error

Publish delivers payload to every active subscriber of topic (non-blocking).

func (*MemoryRealtimeBus) Subscribe

func (b *MemoryRealtimeBus) Subscribe(ctx context.Context, topic string) (<-chan []byte, error)

Subscribe registers a new subscriber channel for topic and removes it when ctx is cancelled.

func (*MemoryRealtimeBus) SubscribeReplay

func (b *MemoryRealtimeBus) SubscribeReplay(ctx context.Context, topic string, _ interfaces.ReplayPolicy) (<-chan []byte, error)

SubscribeReplay on the memory bus is a no-op alias of Subscribe (no durability).

Jump to

Keyboard shortcuts

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