ffi

package
v0.1.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallRemoteTool

func CallRemoteTool(peerIDStr string, toolName string, argsJSON string) string

CallRemoteTool calls an MCP tool on a remote peer and returns the result as a JSON string.

func EnrollNode

func EnrollNode(dataDir string, hubURL string, jwt string, allowLoopback bool) error

EnrollNode enrolls a node.

func FetchHubInfoJSON

func FetchHubInfoJSON(hubURL string) string

FetchHubInfoJSON fetches hub info and returns it as a JSON string. If an error occurs, it returns a JSON object with an "error" field.

func GetMeshInfo

func GetMeshInfo() string

GetMeshInfo returns mesh information as a JSON string.

func GetNodeID

func GetNodeID() string

GetNodeID returns the P2P peer ID.

func IsEnrolled

func IsEnrolled(dataDir string) byte

IsEnrolled checks if the node is enrolled (has a valid identity).

func StartNode

func StartNode(configJSON string) error

StartNode starts the mesh node and the local sidecar API server.

func StopNode

func StopNode() error

StopNode stops the node.

Types

type MobileConfig

type MobileConfig struct {
	DataDir           string `json:"dataDir"`
	HubURL            string `json:"hubURL"`
	MeshID            string `json:"meshID"`
	BindAddr          string `json:"bindAddr"`
	ApiToken          string `json:"apiToken"`
	LogLevel          string `json:"logLevel"`
	DiscoveryInterval string `json:"discoveryInterval"`
	ListenAddrs       string `json:"listenAddrs"` // comma-separated
	AllowLoopback     bool   `json:"allowLoopback"`
	EnableRelay       bool   `json:"enableRelay"`
}

MobileConfig holds simple configuration options for the mobile agent.

Jump to

Keyboard shortcuts

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