Documentation
¶
Index ¶
- Constants
- func CtxGetWebsocketConfig(ctx context.Context) *websocket.Config
- func CtxWithWebsocketConfig(ctx context.Context, config *websocket.Config) context.Context
- func GetWebsocketConfig(req *http.Request) (*websocket.Config, int32, error)
- func SetLogger(l Logger)
- type BodyReader
- type DebugLogger
- type HttpResponseWriter
- type LocalPortal
- type Logger
- type TimeoutConfig
- type WebsocketHandler
Constants ¶
View Source
const ( ResponseSizeLimit = 1024 * 1024 * 4 ResponseReadSize = 512 )
Variables ¶
This section is empty.
Functions ¶
func CtxWithWebsocketConfig ¶
func GetWebsocketConfig ¶
Types ¶
type BodyReader ¶
func (*BodyReader) Close ¶
func (r *BodyReader) Close() error
type DebugLogger ¶
type DebugLogger interface {
Debugf(format string, args ...interface{})
}
type HttpResponseWriter ¶
type HttpResponseWriter struct {
// contains filtered or unexported fields
}
func (*HttpResponseWriter) Flush ¶
func (w *HttpResponseWriter) Flush(finish bool) error
func (*HttpResponseWriter) Header ¶
func (w *HttpResponseWriter) Header() http.Header
func (*HttpResponseWriter) ReadFrom ¶
func (w *HttpResponseWriter) ReadFrom(reader io.Reader) (int, error)
func (*HttpResponseWriter) WriteHeader ¶
func (w *HttpResponseWriter) WriteHeader(statusCode int)
type LocalPortal ¶
type LocalPortal struct {
// contains filtered or unexported fields
}
func NewLocalPortal ¶
func NewLocalPortal(name string, handler http.Handler, remoteHost string) *LocalPortal
func (*LocalPortal) Run ¶
func (p *LocalPortal) Run()
func (*LocalPortal) SetTimeout ¶
func (p *LocalPortal) SetTimeout(t TimeoutConfig)
func (*LocalPortal) SetWebsocketHandler ¶
func (p *LocalPortal) SetWebsocketHandler(h WebsocketHandler)
func (*LocalPortal) Start ¶
func (p *LocalPortal) Start()
func (*LocalPortal) Stop ¶
func (p *LocalPortal) Stop()
type TimeoutConfig ¶
Click to show internal directories.
Click to hide internal directories.