graphsubscriptions

package
v0.47.2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const TaskChannelBufferSize = 10

TaskChannelBufferSize is the buffer size for task subscription channels

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager manages all active subscriptions for real-time updates

func NewManager

func NewManager() *Manager

NewManager creates a new subscription manager

func (*Manager) Publish

func (sm *Manager) Publish(userID string, task *generated.Task) error

Publish sends a task to all subscribers for that user

func (*Manager) Subscribe

func (sm *Manager) Subscribe(userID string, ch chan *generated.Task)

Subscribe adds a new subscriber for a user's task creations

func (*Manager) Unsubscribe

func (sm *Manager) Unsubscribe(userID string, ch chan *generated.Task)

Unsubscribe removes a subscriber

Jump to

Keyboard shortcuts

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