clientfeed

package
v1.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientFeed

type ClientFeed interface {
	Start(wg *sync.WaitGroup)
	Listen(wg *sync.WaitGroup)
	GetFeedClient() *hub.FeedClient
}

ClientFeed is a client recieving messages from a feeb hub it's registered to

func NewClientFeed

func NewClientFeed(conn hub.WebsocketConnection, log *zap.SugaredLogger, unregister UnregisterFunc, config *config.WebSocketConfig) ClientFeed

NewClientFeed returns a new ClientFeed which is an instance of ClientFeedImpl initialized with the provided parameters ClientFeed has an external FeedClient which means it can unregister itself from the feed hub to stop receiving data

type UnregisterFunc

type UnregisterFunc func(client *hub.FeedClient)

UnregisterFunc is used by the ClientFeed to unregister itself from the feed hub. Upon its request, the Feed channel will be closed and no data will be received

Jump to

Keyboard shortcuts

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