FeedHub

package
v0.0.0-...-467dd59 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServeFeedWs

func ServeFeedWs(hub *FeedHub, w http.ResponseWriter, r *http.Request, pingInterval int)

ServeFeedWs handles websocket requests from the peer.

Types

type FeedClient

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

FeedClient Client is a middleman between the websocket connection and the hub.

type FeedHub

type FeedHub struct {
	// Registered clients.
	Clients map[*FeedClient]bool

	// Inbound messages from the clients.
	Broadcast chan ReloadFeed

	Quit chan bool
	// contains filtered or unexported fields
}

FeedHub Hub maintains the set of active clients and broadcasts messages to the clients.

func NewFeedHub

func NewFeedHub() *FeedHub

func (*FeedHub) Run

func (h *FeedHub) Run()

type ReloadFeed

type ReloadFeed struct {
}

Jump to

Keyboard shortcuts

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