nodebridge

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateTypeScriptDeclarations

func GenerateTypeScriptDeclarations(functions map[string]*rpc.FunctionDefinition) string

GenerateTypeScriptDeclarations produces a strictly-typed TypeScript declaration file (.d.ts)

func ServeStdio

func ServeStdio(app *rpc.CoreRPC) error

ServeStdio starts a JSON-line stdio server for parent Node.js child processes

func ServeUnixSocket

func ServeUnixSocket(app *rpc.CoreRPC, socketPath string) error

ServeUnixSocket runs a Unix Domain Socket listener for high-speed local IPC

Types

type BridgeRequest

type BridgeRequest struct {
	ID              string            `json:"id"`
	Function        string            `json:"function"`
	Data            map[string]any    `json:"data"`
	Headers         map[string]string `json:"headers,omitempty"`
	SkipMiddlewares bool              `json:"skipMiddlewares,omitempty"`
	Context         map[string]any    `json:"context,omitempty"`
}

BridgeRequest represents an IPC call from Node.js

type BridgeResponse

type BridgeResponse struct {
	ID      string `json:"id"`
	Status  string `json:"status"` // "ok" or "error"
	Data    any    `json:"data,omitempty"`
	Error   string `json:"error,omitempty"`
	Details any    `json:"details,omitempty"`
}

BridgeResponse represents the IPC response returned to Node.js

Jump to

Keyboard shortcuts

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