bind

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package bind exposes the exported methods of a Go value as ipc calls named "Name.Method" using reflection.

Supported method shapes: an optional leading context.Context, then any number of JSON-decodable parameters (a variadic final parameter is allowed), returning nothing, (T), (error) or (T, error). JS passes the parameters positionally: tango.call("Greeter.Hello", "world").

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(r *ipc.Router, name string, svc any) error

Register binds every exported method of svc under name. It fails, binding nothing, if any exported method has an unsupported signature or svc has no exported methods. Methods are taken from svc's method set, so pass a pointer to include pointer-receiver methods.

Types

This section is empty.

Jump to

Keyboard shortcuts

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