mesh

package
v0.8.1-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: AGPL-3.0-or-later Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMeshPort = 9091
	BroadcastAddr   = "255.255.255.255:9090"
)

Variables

This section is empty.

Functions

func LoadOrCreateIdentity

func LoadOrCreateIdentity() (string, error)

Types

type MeshRuntime

type MeshRuntime struct {
	Mesh *NodeMesh
}

func StartMesh

func StartMesh(port int, handler func(env uil.UILEnvelope)) (*MeshRuntime, error)

type NodeMesh

type NodeMesh struct {
	// contains filtered or unexported fields
}

func NewNodeMesh

func NewNodeMesh(port int, handler func(env uil.UILEnvelope)) (*NodeMesh, error)

func (*NodeMesh) BroadcastGossip

func (m *NodeMesh) BroadcastGossip(env *uil.UILEnvelope) error

func (*NodeMesh) Close

func (m *NodeMesh) Close()

func (*NodeMesh) GetActivePeers

func (m *NodeMesh) GetActivePeers() []PeerInfo

func (*NodeMesh) Start

func (m *NodeMesh) Start(ctx context.Context)

type PeerInfo

type PeerInfo struct {
	NodeID   string    `json:"node_id"`
	Address  string    `json:"address"`
	LastSeen time.Time `json:"last_seen"`
	CPUTemp  float64   `json:"cpu_temp"`
}

Jump to

Keyboard shortcuts

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