1.6 KiB
1.6 KiB
api
Import: dappco.re/go/core/process/pkg/api
Files: 2
Types
ProcessProvider
struct
Route-group and renderable provider for process-daemon registry APIs and the bundled UI entrypoint.
Exported fields:
- None.
Functions
Package Functions
func NewProvider(registry *process.Registry, hub *ws.Hub) *ProcessProvider: Creates a provider backed by the supplied registry and WebSocket hub. Whenregistryisnil, it usesprocess.DefaultRegistry().func PIDAlive(pid int) bool: Usesos.FindProcessplus signal0to report whether a PID is still alive.
ProcessProvider Methods
func (p *ProcessProvider) Name() string: Returns the route-group name"process".func (p *ProcessProvider) BasePath() string: Returns the route-group base path"/api/process".func (p *ProcessProvider) Element() provider.ElementSpec: Returns the UI element spec with tagcore-process-paneland script source/assets/core-process.js.func (p *ProcessProvider) Channels() []string: Returns the WebSocket channels exposed by the provider: daemon started, daemon stopped, daemon health, process started, process output, process exited, and process killed.func (p *ProcessProvider) RegisterRoutes(rg *gin.RouterGroup): RegistersGET /daemons,GET /daemons/:code/:daemon,POST /daemons/:code/:daemon/stop, andGET /daemons/:code/:daemon/health.func (p *ProcessProvider) Describe() []api.RouteDescription: Returns static route descriptions for the daemon list, single-daemon lookup, daemon stop, and daemon health endpoints.