dashboard

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(ln net.Listener, state MeshState) error

Serve 启动无头控制台的 API 服务

Types

type BackendStatus

type BackendStatus struct {
	Name         string `json:"name"`
	InternalHost string `json:"internalHost"`
	InternalPort string `json:"internalPort"`
	Status       string `json:"status"` // Dormant 休眠 或 Running 运行
	PID          int    `json:"pid,omitempty"`
	Uptime       string `json:"uptime,omitempty"`
}

BackendStatus 表示单个后端实例的运行时状态

type MeshState

type MeshState interface {
	GetStatus() map[string]RouteStatus
	GetLogs(port string) []string // 新增获取日志接口
	KillProcess(port string) error
	GetConfigJSON() []byte
	ReloadConfig(rawJSON []byte) error
}

MeshState 控制台向主引擎索取数据的契约

type RouteStatus

type RouteStatus struct {
	Name        string          `json:"name"`
	Protocol    string          `json:"protocol"`
	LoadBalance string          `json:"loadBalance"`
	Backends    []BackendStatus `json:"backends"`
}

RouteStatus 表示单个路由及其下游后端的状态

Jump to

Keyboard shortcuts

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