websocketserver

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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.

func (*Proxy) Close

func (p *Proxy) Close()

Close closes websocket proxy.

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"`

	WssCertBase64 string `yaml:"wssCertBase64" jsonschema:"omitempty,format=base64"`
	WssKeyBase64  string `yaml:"wssKeyBase64" jsonschema:"omitempty,format=base64"`
}

Spec describes the WebSocketServer.

func (*Spec) Validate

func (spec *Spec) Validate() error

Validate validates WebSocketServerSpec.

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) Close

func (ws *WebSocketServer) Close()

Close closes 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.

Jump to

Keyboard shortcuts

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