Documentation
¶
Overview ¶
Package server serves Taskronin's HTTP API over a private Unix socket.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnContext ¶
ConnContext is the http.Server connection hook that captures peer credentials.
Types ¶
type ConnInfo ¶
type ConnInfo struct {
Transport Transport
PeerUID uint32
PeerPID int32
PeerOK bool // SO_PEERCRED read succeeded.
Remote netip.AddrPort // TCP only.
}
ConnInfo records transport metadata captured when the server accepts a connection.
func ConnInfoFrom ¶
ConnInfoFrom returns connection metadata, or its zero value if none was stored.
type Route ¶
type Route struct {
Method, Pattern string
Scopes domain.Scopes
OwnerOnly, Exempt, IfMatch, Long bool
Handler http.HandlerFunc
}
Route is the shared routing and scope-matrix description. Authorization is enforced by the service; these flags document each operation's contract.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server adapts the socket HTTP protocol to the service.
func (*Server) APIHandler ¶
APIHandler returns the socket-only API middleware chain and router.
func (*Server) BeginShutdown ¶
func (s *Server) BeginShutdown()
BeginShutdown cancels long requests; repeated calls are safe.