Documentation
¶
Overview ¶
Package rpc exposes the app's Go services to the window over plain HTTP on the local transport listener: the window is its own process and never imports internal/ (docs/native-window.md). One POST per call:
POST /rpc/<service>.<Method>?token=... body: JSON array of arguments
→ 200 with the method's JSON result (null when it only returns error)
→ 4xx/5xx with {"error": "..."} otherwise
Dispatch is reflection over explicitly registered services — the net/rpc pattern — so a new service method is exposed by registration alone. A method whose first parameter is a context.Context gets the request's, which is done when the caller hangs up; the JSON array carries the arguments after it. Token auth is applied by the transport mount, not here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) Deny ¶
Deny hides one method ("store.Close") from dispatch — for methods that are public for Go callers but must not be reachable from the window.