websocket

package
v0.18.8 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 14 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BufferSize = 100
View Source
var ErrNoErrorHandled = errors.New("handled")
View Source
var ErrNotImplemented = errors.New("operation not implemented")

Functions

func Dial added in v0.14.0

func Dial[T any](url *url.URL, ctx context.Context) (readerOut <-chan T, writerOut chan<- Write[T], err error)

func Serve added in v0.14.0

func Serve[T any](r *gin.RouterGroup, path string, acceptFunc func(c *gin.Context) bool, wsfunc WSHandler[T])

Types

type WSHandler added in v0.14.0

type WSHandler[T any] func(<-chan T, chan<- Write[T], gin.Params, context.Context)

type Write added in v0.14.0

type Write[T any] struct {
	Data T            `json:"data"`
	Err  chan<- error `json:"err"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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