mock

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 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 client 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