desktopcontrol

package
v0.7.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call

func Call(ctx context.Context, runtimeRoot, method string, params, result any) error

func Serve

func Serve(ctx context.Context, runtimeRoot string, handler Handler) error

Types

type Handler

type Handler func(context.Context, Request) (any, error)

Handler 只处理已验证的本地请求。传输层负责限制消息大小与本机权限。

type Request

type Request struct {
	ID     string          `json:"id"`
	Method string          `json:"method"`
	Params json.RawMessage `json:"params,omitempty"`
}

Request 是桌面端与后台核心之间的本地控制请求。

Jump to

Keyboard shortcuts

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