server

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package server is core logic shared by wspc wsps

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New added in v0.4.1

func New(config *Config) http.Handler

func NewWithHandler added in v0.4.1

func NewWithHandler(config *Config, handler http.Handler) http.Handler

Types

type Config

type Config struct {
	Log logger.Config `json:"log,omitempty"`

	SSL  SSL    `json:"ssl,omitempty"`
	Host string `json:"host,omitempty"`
	Auth string `json:"auth,omitempty"`
	Path string `json:"path,omitempty"`
	Port uint64 `json:"port,omitempty"`
}

func (*Config) EnbleSSL added in v0.5.1

func (c *Config) EnbleSSL() bool

type Hub added in v0.1.2

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

func (*Hub) Exist added in v0.5.0

func (s *Hub) Exist(channel string) (exist bool)

func (*Hub) Load added in v0.5.0

func (s *Hub) Load(channel string) (interface{}, bool)

func (*Hub) Remove added in v0.5.0

func (s *Hub) Remove(channel string)

func (*Hub) Store added in v0.5.0

func (s *Hub) Store(channel string, r interface{})

type SSL added in v0.5.1

type SSL struct {
	Enable bool   `json:"enable,omitempty"`
	Key    string `json:"key,omitempty"`
	Cert   string `json:"cert,omitempty"`
}

type Wsps

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

func (*Wsps) ServeHTTP added in v0.1.2

func (s *Wsps) ServeHTTP(rw http.ResponseWriter, r *http.Request)

func (*Wsps) ServeProxy added in v0.2.0

func (s *Wsps) ServeProxy(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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