Help us shape the future of Go! Take the 2026 Go Developer Survey

pubsub

package
v2.11.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 1 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PubSub

type PubSub[T any] struct {
	// contains filtered or unexported fields
}

func (*PubSub[T]) Close

func (me *PubSub[T]) Close()

func (*PubSub[T]) NumSubs added in v2.11.0

func (me *PubSub[T]) NumSubs() int

NumSubs returns the number of active subscribers.

func (*PubSub[T]) Publish

func (me *PubSub[T]) Publish(v T)

func (*PubSub[T]) Subscribe

func (me *PubSub[T]) Subscribe() (ret *Subscription[T])

type Subscription

type Subscription[T any] struct {
	Values chan T
	// contains filtered or unexported fields
}

func (*Subscription[T]) Close

func (me *Subscription[T]) Close()

Jump to

Keyboard shortcuts

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