server

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthPolicyInput

type AuthPolicyInput struct {
	Method string            `json:"method"`
	Path   string            `json:"path"`
	Header map[string]string `json:"header"`
	Remote string            `json:"remote"`
}

type AuthPolicyOutput

type AuthPolicyOutput struct {
	Allow bool `json:"allow"`
}

type Option

type Option func(*Server)

func WithNoClientCode added in v0.0.3

func WithNoClientCode(code int64) Option

func WithPolicy

func WithPolicy(policy *opaq.Client) Option

func WithUpgrade

func WithUpgrade(upgrade Upgrade) Option

type Server

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

func New

func New(svc *hub.Service, opts ...Option) *Server

func (*Server) ServeHTTP

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

type Upgrade

type Upgrade func(w http.ResponseWriter, r *http.Request, responseHeader http.Header) (*websocket.Conn, error)

Jump to

Keyboard shortcuts

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