Help us shape the future of Go! Take the 2026 Go Developer Survey

api

package
v1.0.0 Latest Latest
Warning

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

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

README

Deprecated

Refactor after v0.10.3 release

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WebSockets = map[string]*WebSocket{}

WebSockets websockets loaded (Alpha)

Functions

This section is empty.

Types

type WebSocket

type WebSocket struct {
	websocket.WSClientOption
	Event  WebSocketEvent `json:"event,omitempty"`
	Client *websocket.WSClient
}

WebSocket the websocket struct

func LoadWebSocket

func LoadWebSocket(source string, name string) (*WebSocket, error)

LoadWebSocket load websockets client

func SelectWebSocket

func SelectWebSocket(name string) *WebSocket

SelectWebSocket Get WebSocket client by name

func (*WebSocket) Open

func (ws *WebSocket) Open(args ...string) error

Open open the websocket connection

type WebSocketEvent

type WebSocketEvent struct {
	Data      string `json:"data,omitempty"`
	Error     string `json:"error,omitempty"`
	Closed    string `json:"closed,omitempty"`
	Connected string `json:"connected,omitempty"`
}

WebSocketEvent the websocket struct

Jump to

Keyboard shortcuts

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