pubsubservice

package
v0.0.0-...-08671e0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const TopicUrl = "mem://updates"

Variables

This section is empty.

Functions

This section is empty.

Types

type Publisher

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

func NewPublisher

func NewPublisher(topicUrl string) *Publisher

func (*Publisher) Close

func (p *Publisher) Close()

func (Publisher) PublishUpdate

func (p Publisher) PublishUpdate(username string, ip netip.Addr) error

type Subscriber

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

func NewSubscriber

func NewSubscriber(topicUrl string) *Subscriber

func (*Subscriber) Close

func (s *Subscriber) Close()

func (*Subscriber) Listen

func (s *Subscriber) Listen(handle func(username string, ip netip.Addr) error)

Jump to

Keyboard shortcuts

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