server

package
v0.0.0-...-f8fabdd Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadInitiaWSRequest

func ReadInitiaWSRequest(s *Server, clientConn net.Conn) (string, []byte, interface{}, error)

func Run

func Run(c *cli.Context)

Types

type Config

type Config struct {
	Cert       string `json:"cert" yaml:"cert"`                                          // Cert CertDir
	Key        string `json:"key" yaml:"key"`                                            // Key KeyDir
	Addr       string `json:"addr" yaml:"addr"`                                          // Addr 52.33.220.110:443
	SecretLink string `json:"secret_link" yaml:"secret-link" mapstructure:"secret-link"` // SecretLink ws uri
	Upstream   string `json:"upstream" yaml:"upstream"`
}

func NewConfig

func NewConfig(c *cli.Context) (config *Config)

type Server

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

func NewServer

func NewServer(c *cli.Context) *Server

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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