mock

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Acceptor

type Acceptor interface {
	Accept(w http.ResponseWriter, r *http.Request, channelKey string) error
}

Acceptor is an acceptor interface for the NewChannelPool as to not be dependant on the streamer package

type WSChannel

type WSChannel struct {
	ID   string
	Conn *websocket.Conn
}

WSChannel has the client side connection and it's ID refers to the ID the stream would use to reference it.

func NewChannelPool

func NewChannelPool(t *testing.T, a Acceptor, connectionCount int) []WSChannel

NewChannelPool returns a pool of channel side ws connections that get injected via the Accept method which Stream satisfies.

Jump to

Keyboard shortcuts

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