Documentation ¶
Index ¶
- Constants
- type Proxy
- type Spec
- type WebSocketServer
- func (ws *WebSocketServer) Category() supervisor.ObjectCategory
- func (ws *WebSocketServer) Close()
- func (ws *WebSocketServer) DefaultSpec() interface{}
- func (ws *WebSocketServer) Inherit(superSpec *supervisor.Spec, previousGeneration supervisor.Object)
- func (ws *WebSocketServer) Init(superSpec *supervisor.Spec)
- func (ws *WebSocketServer) Kind() string
- func (ws *WebSocketServer) Status() *supervisor.Status
- func (ws *WebSocketServer) Validate() error
Constants ¶
View Source
const ( // Category is the category of WebSocketServer. Category = supervisor.CategoryBusinessController // Kind is the kind of WebSocketServer. Kind = "WebSocketServer" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
Proxy is a handler that takes an incoming WebSocket connection and proxies it to the backend server.
type Spec ¶
type Spec struct { Port uint16 `yaml:"port" jsonschema:"required,minimum=1"` HTTPS bool `yaml:"https" jsonschema:"required"` Backend string `yaml:"backend" jsonschema:"required"` CertBase64 string `yaml:"certBase64" jsonschema:"omitempty,format=base64"` KeyBase64 string `yaml:"keyBase64" jsonschema:"omitempty,format=base64"` // contains filtered or unexported fields }
Spec describes the WebSocketServer.
type WebSocketServer ¶
type WebSocketServer struct {
// contains filtered or unexported fields
}
WebSocketServer implements WebSocket protocol in EG.
func (*WebSocketServer) Category ¶
func (ws *WebSocketServer) Category() supervisor.ObjectCategory
Category returns the category of WebsocketServer.
func (*WebSocketServer) DefaultSpec ¶
func (ws *WebSocketServer) DefaultSpec() interface{}
DefaultSpec returns the default spec of WebSocketServer.
func (*WebSocketServer) Inherit ¶
func (ws *WebSocketServer) Inherit(superSpec *supervisor.Spec, previousGeneration supervisor.Object)
Inherit inherits previous generation of WebSocketServer.
func (*WebSocketServer) Init ¶
func (ws *WebSocketServer) Init(superSpec *supervisor.Spec)
Init initializes Function.
func (*WebSocketServer) Kind ¶
func (ws *WebSocketServer) Kind() string
Kind returns the kind of WebsocketServer.
func (*WebSocketServer) Status ¶
func (ws *WebSocketServer) Status() *supervisor.Status
Status returns Status generated by proxy.
func (*WebSocketServer) Validate ¶
func (ws *WebSocketServer) Validate() error
Validate validates the websocketserver structure.
Click to show internal directories.
Click to hide internal directories.