Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageHandler ¶
type PubSub ¶
type PubSub[T any] struct { // contains filtered or unexported fields }
func (*PubSub[T]) Subscribe ¶
func (ps *PubSub[T]) Subscribe(onMsg MessageHandler[T]) *Subscription[T]
func (*PubSub[T]) Unsubscribe ¶
func (ps *PubSub[T]) Unsubscribe(sub *Subscription[T])
type Subscription ¶
type Subscription[T any] struct { // contains filtered or unexported fields }
func NewSubscription ¶
func NewSubscription[T any](onMsg MessageHandler[T]) *Subscription[T]
func (*Subscription[T]) GetID ¶
func (s *Subscription[T]) GetID() string
func (*Subscription[T]) Push ¶
func (s *Subscription[T]) Push(msg T)
func (*Subscription[T]) Run ¶
func (s *Subscription[T]) Run(ctx context.Context)
Click to show internal directories.
Click to hide internal directories.