consumer

package
v0.0.0-...-293aeef Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2025 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 Consumer

type Consumer struct {
	Topic messagequeue.TopicIdentifier
	// The websocket connection.
	Conn *websocket.Conn
}

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

type ConsumerProxy

type ConsumerProxy interface {
	Start() error
}

type ConsumerRelay

type ConsumerRelay interface {
	AddConsumer(consumer *Consumer) bool
	Relay() error
}

type WSConsumerProxy

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

func NewWSConsumerProxy

func NewWSConsumerProxy(listenAddrs []string, consumerProxyLoadBalancerChannel chan<- *Consumer) *WSConsumerProxy

func (*WSConsumerProxy) ServeHTTP

func (wscp *WSConsumerProxy) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*WSConsumerProxy) Start

func (wscp *WSConsumerProxy) Start() error

type WSConsumerRelay

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

func NewWSConsumerRelay

func NewWSConsumerRelay(storeConnector src.StoreConnector) *WSConsumerRelay

func (*WSConsumerRelay) AddConsumer

func (wscr *WSConsumerRelay) AddConsumer(consumer *Consumer) bool

Adds a new connection for the messages to be relayed.

func (*WSConsumerRelay) Relay

func (wscr *WSConsumerRelay) Relay() error

Sends the message to all

Jump to

Keyboard shortcuts

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