server

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PingInterval = 5 * time.Second
	PingWait     = 10 * time.Second
)
View Source
const (
	CloseNormalClosure = 1000
)

Variables

This section is empty.

Functions

func IgnoreUserAgent added in v0.0.19

func IgnoreUserAgent(urls ...string) slogecho.Filter

func Start

func Start(logger *slog.Logger, cfg Config) error

Types

type Config

type Config struct {
	GithubClientid     string
	GithubUserProvider auth.GithubUserProvider
	Port               string
	Debug              bool
}

type Handler added in v0.0.19

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

func (*Handler) OnClose added in v0.0.19

func (c *Handler) OnClose(socket *gws.Conn, err error)

func (*Handler) OnMessage added in v0.0.19

func (c *Handler) OnMessage(socket *gws.Conn, wsmsg *gws.Message)

func (*Handler) OnOpen added in v0.0.19

func (c *Handler) OnOpen(socket *gws.Conn)

func (*Handler) OnPing added in v0.0.19

func (c *Handler) OnPing(socket *gws.Conn, payload []byte)

func (*Handler) OnPong added in v0.0.19

func (c *Handler) OnPong(socket *gws.Conn, payload []byte)

Jump to

Keyboard shortcuts

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