Documentation ¶
Index ¶
- Variables
- func Forward(_ context.Context, from, to *websocket.Conn) error
- func NewDialer(cfg *DialerConfig) *websocket.Dialer
- func NewUpgrader(cfg *UpgraderConfig) *websocket.Upgrader
- func PipeConn(ctx context.Context, clientConn, serverConn *websocket.Conn) (clientErrors, serverErrors <-chan error)
- type DialerConfig
- type InterceptorFunc
- type Proxy
- type ProxyConfig
- type UpgraderConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var GoingAway = websocket.FormatCloseMessage(websocket.CloseGoingAway, "")
Functions ¶
func NewDialer ¶
func NewDialer(cfg *DialerConfig) *websocket.Dialer
func NewUpgrader ¶
func NewUpgrader(cfg *UpgraderConfig) *websocket.Upgrader
Types ¶
type DialerConfig ¶
type DialerConfig struct { HandshakeTimeout *json.Duration `json:"handshakeTimeout,omitempty"` ReadBufferSize *int `json:"readBufferSize,omitempty"` WriteBufferSize *int `json:"writeBufferSize,omitempty"` EnableCompression *bool `json:"enableCompression,omitempty"` }
func (*DialerConfig) SetDefault ¶
func (cfg *DialerConfig) SetDefault() *DialerConfig
type InterceptorFunc ¶
type Proxy ¶
type Proxy struct { Interceptor InterceptorFunc ReqPreparer request.Preparer RespModifier response.Modifier ErrorHandler proxy.HandleRoundTripErrorFunc Upgrader *websocket.Upgrader Dialer *websocket.Dialer PingPongTimeout time.Duration WriteControlMsgTimeout time.Duration CloseGracePeriod time.Duration // contains filtered or unexported fields }
func (*Proxy) RegisterServerShutdown ¶
type ProxyConfig ¶
type ProxyConfig struct { Upgrader *UpgraderConfig `json:"upgrader,omitempty"` Dialer *DialerConfig `json:"dialer,omitempty"` PingPongTimeout *json.Duration `json:"pingPongTimeout,omitempty"` WriteControlMsgTimeout *json.Duration `json:"writeControlMsgTimeout,omitempty"` }
func (*ProxyConfig) SetDefault ¶
func (cfg *ProxyConfig) SetDefault() *ProxyConfig
type UpgraderConfig ¶
type UpgraderConfig struct { HandshakeTimeout *json.Duration `json:"handshakeTimeout,omitempty"` ReadBufferSize *int `json:"readBufferSize,omitempty"` WriteBufferSize *int `json:"writeBufferSize,omitempty"` EnableCompression *bool `json:"enableCompression,omitempty"` }
func (*UpgraderConfig) SetDefault ¶
func (cfg *UpgraderConfig) SetDefault() *UpgraderConfig
Click to show internal directories.
Click to hide internal directories.