wsserver

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(store *Store, authToken string) http.HandlerFunc

func Run

func Run(addr string, store *Store, _ []string, authToken string) error

func StatusHandler

func StatusHandler(store *Store) http.HandlerFunc

Types

type Message

type Message struct {
	Type     string            `json:"type"`
	ClientID string            `json:"clientId"`
	Config   *embed.SiteConfig `json:"config,omitempty"`
	Error    string            `json:"error,omitempty"`
}

type Store

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

func GetStore

func GetStore() *Store

func NewStore

func NewStore() *Store

func (*Store) Get

func (s *Store) Get(clientID string) (embed.SiteConfig, bool)

func (*Store) GetAll

func (s *Store) GetAll() map[string]embed.SiteConfig

func (*Store) Set

func (s *Store) Set(clientID string, config embed.SiteConfig)

Jump to

Keyboard shortcuts

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