{"modulePath":"github.com/GoCodeAlone/workflow-plugin-websocket","version":"v0.5.6","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package internal\n\n## Variables\n\n```go\nvar Version = \"0.0.0\"\n```\nVersion is set at build time via -ldflags \"-X github.com/GoCodeAlone/workflow-plugin-websocket/internal.Version=X.Y.Z\"\n\n## Functions\n\n```go\nfunc GetHub() *hub\n```\nGetHub returns the global WebSocket hub for step types to use.\n\n```go\nfunc NewWebSocketPlugin() sdk.PluginProvider\n```\n\n```go\nfunc SetBroadcastHook(f func(room string, msg []byte) int)\n```\nSetBroadcastHook installs a hook that overrides room broadcasts in step.ws\\_broadcast. Pass nil to remove the hook.\n\n```go\nfunc SetSendHook(f func(connID string, msg []byte) bool)\n```\nSetSendHook installs a hook that overrides direct sends in step.ws\\_send. Pass nil to remove the hook.\n\n## Types\n\n```go\ntype WSServerInstance interface {\n\tsdk.ModuleInstance\n\tServeHTTP(w http.ResponseWriter, r *http.Request)\n\tHTTPPath() string\n}\n```\nWSServerInstance is the public interface for the ws.server module, exposing the HTTP handler methods needed for in-process registration.\n\n```go\nfunc NewWSServerModule(name string, config map[string]any) (WSServerInstance, error)\n```\nNewWSServerModule creates a new ws.server module instance and returns it via the WSServerInstance interface so the host binary can register the WebSocket upgrade handler directly on the engine's HTTP router.\n\n","path":"github.com/GoCodeAlone/workflow-plugin-websocket/internal","name":"internal","synopsis":"","isRedistributable":true}
