lumen-sdk

module
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: MIT

README

Lumen SDK

Lumen SDK 是 Go 工具包,用于发现并调用分布式 Lumen ML 推理节点。

  • pkg/client:gRPC 客户端、任务路由、连接池、健康状态和自动分块。
  • pkg/discovery:mDNS、Host Broker WebSocket、静态节点发现。
  • pkg/hostbroker:只提供节点发现控制面,不代理推理 Payload。
  • cmd/lumen-hostd:跨平台 Host Broker 服务和 CLI。
  • pkg/types / proto:统一任务、Tensor 和 gRPC 协议契约。
cfg := config.DefaultConfig()
c, err := client.NewLumenClient(cfg, logger)
if err != nil { log.Fatal(err) }
if err := c.Start(ctx); err != nil { log.Fatal(err) }
defer c.Close()
resp, err := c.Infer(ctx, req)

构建和测试:make buildgo test ./...。Host Broker 默认监听 0.0.0.0:5866,生产环境请配置网络隔离或认证层。

Directories

Path Synopsis
cmd
lumen-bench command
lumen-hostd command
lumen-hostd/internal/native
Package native manages OS-native background service registration for lumen-hostd: a per-user LaunchAgent on macOS, a Task Scheduler entry on Windows, and a systemd user unit on Linux.
Package native manages OS-native background service registration for lumen-hostd: a per-user LaunchAgent on macOS, a Task Scheduler entry on Windows, and a systemd user unit on Linux.
examples
client/ocr command
pkg
discovery
Package discovery defines the unified operational discovery abstraction.
Package discovery defines the unified operational discovery abstraction.
hostbroker
Package hostbroker is the Lumen Host Broker's discovery-only server surface: health, version, node listing, and the /v1/nodes/watch push-discovery endpoint consumed by discovery.BrokerResolver.
Package hostbroker is the Lumen Host Broker's discovery-only server surface: health, version, node listing, and the /v1/nodes/watch push-discovery endpoint consumed by discovery.BrokerResolver.
types
Package types provides type-safe data structures for ML inference operations.
Package types provides type-safe data structures for ML inference operations.
utils
Package utils provides utility functions and types for the Lumen SDK.
Package utils provides utility functions and types for the Lumen SDK.

Jump to

Keyboard shortcuts

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