Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiOriginAllow ¶
type Config ¶
type Config struct {
AuthHost any `json:"authHost"`
AuthEndpoint string `json:"authEndpoint"`
Clients []Client `json:"clients"`
Database string `json:"database"`
DatabaseConfig DatabaseConfig `json:"databaseConfig"`
DevMode bool `json:"devMode"`
Host any `json:"host"`
Port string `json:"port"`
Protocol string `json:"protocol"`
Socketio *ServerOptions `json:"socketio"`
SslCertPath string `json:"sslCertPath"`
SslKeyPath string `json:"sslKeyPath"`
Subscribers Subscribers `json:"subscribers"`
ApiOriginAllow ApiOriginAllow `json:"apiOriginAllow"`
Headers map[string]string `json:"header"`
}
type DatabaseConfig ¶
type ServerOptions ¶ added in v1.1.0
type ServerOptions struct {
// how many ms without a pong packet to consider the connection closed
PingTimeout *int64 `json:"pingTimeout,omitempty"`
// how many ms before sending a new ping packet
PingInterval *int64 `json:"pingInterval,omitempty"`
// how many ms before an uncompleted transport upgrade is cancelled
UpgradeTimeout *int64 `json:"upgradeTimeout,omitempty"`
// how many bytes or characters a message can be, before closing the session (to avoid DoS).
MaxHttpBufferSize *int64 `json:"maxHttpBufferSize,omitempty"`
// whether to allow transport upgrades
AllowUpgrades *bool `json:"allowUpgrades,omitempty"`
// parameters of the WebSocket permessage-deflate extension (see ws module api docs). Set to false to disable.
PerMessageDeflate *types.PerMessageDeflate `json:"perMessageDeflate,omitempty"`
// parameters of the http compression for the polling transports (see zlib api docs). Set to false to disable.
HttpCompression *types.HttpCompression `json:"httpCompression,omitempty"`
// the options that will be forwarded to the cors module
Cors *types.Cors `json:"cors,omitempty"`
// whether to enable compatibility with Socket.IO v2 clients
AllowEIO3 *bool `json:"allowEIO3,omitempty"`
// name of the path to capture
Path *string `json:"path,omitempty"`
// destroy unhandled upgrade requests
DestroyUpgrade *bool `json:"destroyUpgrade,omitempty"`
// milliseconds after which unhandled requests are ended
DestroyUpgradeTimeout *int64 `json:"destroyUpgradeTimeout,omitempty"`
// whether to serve the client files
ServeClient *bool `json:"serveClient,omitempty"`
// how many ms before a client without namespace is closed
ConnectTimeout *int64 `json:"connectTimeout,omitempty"`
}
func (*ServerOptions) Config ¶ added in v1.1.0
func (s *ServerOptions) Config() *socket.ServerOptions
type Subscribers ¶
Click to show internal directories.
Click to hide internal directories.