pubsub

package
v0.0.0-...-fbeb115 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message string
const (
	MessageOpen  Message = "openpls"
	MessageClose Message = "close"
)

type Publisher

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

func NewPublisher

func NewPublisher() (*Publisher, error)

func (Publisher) Publish

func (p Publisher) Publish(ctx context.Context, message Message) error

type Subscriber

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

func NewSubscriber

func NewSubscriber() (*Subscriber, error)

func (Subscriber) Subscribe

func (s Subscriber) Subscribe(ctx context.Context, receiveChan chan<- Message) error

Jump to

Keyboard shortcuts

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