connect

package
v0.0.0-...-1dac6a7 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Don is the global channel to signal program termination. If this channel is
	// closed, then all streaming connections should be terminated gracefully.
	Don <-chan struct{}
	// Env
	Env envvar.Env
	// Log is the logger interface for printing structured log messages.
	Log logger.Interface
	// Reg is the onchain interface for the Registry smart contract.
	Reg *registry.Registry
	// Rtr
	Rtr *router.Client
	// Uni provides a thread safe mechanism to allocate compact player IDs.
	// Allocation happens in the server handler, freeing allocated player IDs
	// happens in the game engine.
	Uni *unique.Unique[common.Address, byte]
}

type Handler

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

func New

func New(c Config) *Handler

func (*Handler) Daemon

func (h *Handler) Daemon()

func (*Handler) HandlerFunc

func (h *Handler) HandlerFunc(w http.ResponseWriter, r *http.Request) error

Jump to

Keyboard shortcuts

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