wsservermocks

package
v1.6.7 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Protocol

type Protocol struct {
	mock.Mock
}

Protocol is an autogenerated mock type for the Protocol type

func NewProtocol

func NewProtocol(t interface {
	mock.TestingT
	Cleanup(func())
}) *Protocol

NewProtocol creates a new instance of Protocol. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Protocol) Broadcast

func (_m *Protocol) Broadcast(ctx context.Context, stream string, payload interface{})

Broadcast provides a mock function with given fields: ctx, stream, payload

func (*Protocol) RoundTrip

func (_m *Protocol) RoundTrip(ctx context.Context, stream string, payload wsserver.WSBatch) (*wsserver.WebSocketCommandMessage, error)

RoundTrip provides a mock function with given fields: ctx, stream, payload

type WebSocketServer

type WebSocketServer struct {
	mock.Mock
}

WebSocketServer is an autogenerated mock type for the WebSocketServer type

func NewWebSocketServer

func NewWebSocketServer(t interface {
	mock.TestingT
	Cleanup(func())
}) *WebSocketServer

NewWebSocketServer creates a new instance of WebSocketServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*WebSocketServer) Broadcast

func (_m *WebSocketServer) Broadcast(ctx context.Context, stream string, payload interface{})

Broadcast provides a mock function with given fields: ctx, stream, payload

func (*WebSocketServer) Close

func (_m *WebSocketServer) Close()

Close provides a mock function with no fields

func (*WebSocketServer) Handler

func (_m *WebSocketServer) Handler(w http.ResponseWriter, r *http.Request)

Handler provides a mock function with given fields: w, r

func (*WebSocketServer) RoundTrip

RoundTrip provides a mock function with given fields: ctx, stream, payload

Jump to

Keyboard shortcuts

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