websockets

package
v0.38.0-preview.0.0.7 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MaxSubscriptionsPerConnection uint64
	MaxResponsesPerSecond         uint64
	SendMessageTimeout            time.Duration
	MaxRequestSize                int64
}

func NewDefaultWebsocketConfig

func NewDefaultWebsocketConfig() Config

type Controller

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

func NewWebSocketController

func NewWebSocketController(
	logger zerolog.Logger,
	config Config,
	streamApi state_stream.API,
	streamConfig backend.Config,
	conn *websocket.Conn,
) *Controller

func (*Controller) HandleConnection

func (c *Controller) HandleConnection(ctx context.Context)

HandleConnection manages the WebSocket connection, adding context and error handling.

type Handler

type Handler struct {
	*common.HttpHandler
	// contains filtered or unexported fields
}

func NewWebSocketHandler

func NewWebSocketHandler(
	logger zerolog.Logger,
	config Config,
	chain flow.Chain,
	streamApi state_stream.API,
	streamConfig backend.Config,
	maxRequestSize int64,
) *Handler

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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