client

package
v0.0.0-...-ca5e079 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultUpgrader = &websocket.Upgrader{
	ReadBufferSize:  1024,
	WriteBufferSize: 1024,
	CheckOrigin: func(r *http.Request) bool {
		return true
	},
}

Functions

func LoadStaticFiles

func LoadStaticFiles() (*staticFiles, error)

Types

type Config

type Config struct {
	ContentServerURL string
	ServerAddr       string
}

type HTTPClientServer

type HTTPClientServer struct {
	*echo.Echo
	// contains filtered or unexported fields
}

func NewHTTPClientServer

func NewHTTPClientServer(ctx context.Context, cfg *Config) (*HTTPClientServer, error)

func (*HTTPClientServer) Serve

func (h *HTTPClientServer) Serve(l net.Listener) error

type HostHeaderTransport

type HostHeaderTransport struct {
	http.RoundTripper
	Host string
}

func (*HostHeaderTransport) RoundTrip

func (t *HostHeaderTransport) RoundTrip(req *http.Request) (*http.Response, error)

type TemplateRenderer

type TemplateRenderer struct {
	*template.Template
}

func (*TemplateRenderer) Render

func (t *TemplateRenderer) Render(
	w io.Writer,
	name string,
	data interface{},
	c echo.Context,
) error

type WebsocketUDPProxy

type WebsocketUDPProxy struct {
	Upgrader *websocket.Upgrader
	// contains filtered or unexported fields
}

WebsocketUDPProxy

func NewProxy

func NewProxy(ctx context.Context, addr string) (*WebsocketUDPProxy, error)

func (*WebsocketUDPProxy) Serve

func (w *WebsocketUDPProxy) Serve(l net.Listener) error

func (*WebsocketUDPProxy) ServeHTTP

func (w *WebsocketUDPProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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