server

package
v0.0.0-...-8667f16 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenAndServe

func ListenAndServe(config *Config)

ListenAndServe create a falcon-ws server.

Types

type Config

type Config struct {
	// server listen address.
	Addr string

	// certification file path.
	Cert string

	// private key file path.
	PrivateKey string

	// key for digital signature.
	SignatureKey string

	// password for proxy service.
	Password string
}

type Ctx

type Ctx struct {
	Data map[string]interface{}
	// contains filtered or unexported fields
}

type HttpHandler

type HttpHandler struct {
	// contains filtered or unexported fields
}

func (*HttpHandler) GetHandleFunc

func (h *HttpHandler) GetHandleFunc() func(http.ResponseWriter, *http.Request)

func (*HttpHandler) Use

func (h *HttpHandler) Use(m Middleware)

type Middleware

type Middleware = func(ctx *Ctx) (err error, code int)

Jump to

Keyboard shortcuts

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