server

package
v1.26.9 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Version         string
	Domain          string
	Port            int
	TCPPort         int
	Secure          bool
	Token           types.GetToken
	Notification    *client.NotificationConfig
	BandwidthLimits *limiter.ClientBandwidthLimits
}

Options contains options for creating a server

type Server

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

Server represents the main server instance

func New

func New(options Options) (*Server, error)

New creates and initializes a new server instance

func (*Server) Start

func (s *Server) Start() error

Start starts the server

func (*Server) Stop

func (s *Server) Stop() error

Stop stops the server

func (*Server) UpdateConfig

func (s *Server) UpdateConfig(
	getToken types.GetToken,
	notificationConfig *client.NotificationConfig,
	bandwidthLimits *limiter.ClientBandwidthLimits,
) error

UpdateConfig updates the server configuration dynamically

type WebSocketMonitor

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

WebSocketMonitor manages WebSocket connections and authentication

func CreateWebSocketMonitor

func CreateWebSocketMonitor(ctx *types.Context, options *monitorchannel.CreateWebSocketOptions) *WebSocketMonitor

CreateWebSocketMonitor creates a new WebSocket monitor

func (*WebSocketMonitor) Attach

func (m *WebSocketMonitor) Attach(server *http.Server)

Attach attaches the WebSocket monitor to an HTTP server

func (*WebSocketMonitor) OnTunnel

func (m *WebSocketMonitor) OnTunnel(handler func(data map[string]interface{}))

OnTunnel registers a handler for tunnel events

Directories

Path Synopsis
channels

Jump to

Keyboard shortcuts

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