rwebsocket

package
v0.0.0-...-6ce7508 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateService

func CreateService(srv WebSocketRPC, options []connect.HandlerOption) (*api.Service, error)

Types

type WebSocketEvent

type WebSocketEvent struct {
	Type      string
	WebSocket *apiv1.WebSocket
}

type WebSocketHeaderEvent

type WebSocketHeaderEvent struct {
	Type            string
	WebSocketHeader *apiv1.WebSocketHeader
}

type WebSocketHeaderTopic

type WebSocketHeaderTopic struct {
	WorkspaceID idwrap.IDWrap
}

type WebSocketRPC

type WebSocketRPC struct {
	web_socketv1connect.UnimplementedWebSocketServiceHandler

	DB *sql.DB
	// contains filtered or unexported fields
}

WebSocketRPC handles WebSocket CRUD operations and real-time sync.

func New

func New(deps Deps) WebSocketRPC

func (*WebSocketRPC) WebSocketDelete

func (*WebSocketRPC) WebSocketHeaderSync

func (*WebSocketRPC) WebSocketInsert

func (*WebSocketRPC) WebSocketProxyHandler

func (s *WebSocketRPC) WebSocketProxyHandler() http.Handler

WebSocketProxyHandler returns an HTTP handler that proxies WebSocket connections. The client connects to this endpoint, which loads headers from the database, dials the target WebSocket server with those headers, and relays messages bidirectionally between client and target.

func (*WebSocketRPC) WebSocketSync

func (*WebSocketRPC) WebSocketUpdate

type WebSocketTopic

type WebSocketTopic struct {
	WorkspaceID idwrap.IDWrap
}

Jump to

Keyboard shortcuts

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