Versions in this module Expand all Collapse all v0 v0.4.7 May 3, 2024 Changes in this version + var IP2LOCATION []byte + func WriteError(w http.ResponseWriter, status int) + func WriteJson(w http.ResponseWriter, r *http.Request, data any) + type ApiHandler struct + Desc string + Handler func(w http.ResponseWriter, r *http.Request) + Method string + Pattern string + type Peer struct + Address string + Bytes_recvd uint64 + Bytes_sent uint64 + Coords []uint64 + Country_long string + Country_short string + Key string + Multicast bool + Port uint64 + Priority uint64 + Remote string + Remote_ip string + Uptime float64 + type RestServer struct + func NewRestServer(cfg RestServerCfg) (*RestServer, error) + func (a *RestServer) AddHandler(handler ApiHandler) error + func (a *RestServer) Serve() error + func (a *RestServer) Shutdown() error + type RestServerCfg struct + ConfigFn string + Core *core.Core + Domain string + Features []string + ListenAddress string + Log core.Logger + Multicast *multicast.Multicast + WwwRoot string + type ServerEvent struct + Data []byte + Event string