server

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package server exposes an mqlite Engine as a Connect-style JSON-over-HTTP broker (design §7). Every unary RPC is a plain HTTP POST to /mqlite.v1.<Service>/<Method> with a JSON body — curl-able by construction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Version string // reported by the open "/" discovery endpoint; "" -> "dev"
	// contains filtered or unexported fields
}

Server adapts an Engine to HTTP with static Bearer-token auth.

func New

func New(eng *engine.Engine, tokens []string) *Server

New builds a Server. tokens is the set of accepted Bearer tokens; pass nil/empty to disable auth (documented as a localhost/LAN downgrade, §7.5).

func (*Server) Handler

func (s *Server) Handler() http.Handler

Handler returns the auth-wrapped HTTP handler.

Jump to

Keyboard shortcuts

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