launcherapi

package
v0.0.0-...-147f0cf Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package launcher with the launcher interface

Index

Constants

View Source
const ListMethod = "list"
View Source
const ManageCapability = "manage"

ManageCapability is the name of the Thing/Capability that handles management requests

View Source
const ServiceName = "launcher"

ServiceName used to connect to this service

View Source
const StartAllPluginsMethod = "startAllPlugins"
View Source
const StartPluginMethod = "startPlugin"
View Source
const StopAllPluginsMethod = "stopAllPlugins"
View Source
const StopPluginMethod = "stopPlugin"

Variables

This section is empty.

Functions

This section is empty.

Types

type ListArgs

type ListArgs struct {
	OnlyRunning bool `json:"onlyRunning"`
}

type ListResp

type ListResp struct {
	PluginInfoList []PluginInfo `json:"info"`
}

type PluginInfo

type PluginInfo struct {
	// CPU usage in %. 0 when not running
	CPU int

	// RSS (Resident Set Size) Memory usage in Bytes. 0 when not running.
	RSS int

	// Service modified time ISO8601
	ModifiedTime string

	// name of the service
	Name string

	// path to service executable
	Path string

	// Program PID when started. This remains after stopping.
	PID int

	// Service is currently running
	Running bool

	// binary size of the service in bytes
	Size int64

	// The last status message received from the process
	Status string

	// Number of times the service was restarted
	StartCount int

	// Starting time of the service in ISO8601
	StartTimeMSE int64

	// Stopped time of the service in msec-since epoc
	StopTimeMSE int64

	// uptime time the service is running in seconds.
	Uptime int
}

PluginInfo contains the running status of a service

type StartPluginArgs

type StartPluginArgs struct {
	Name string `json:"name"`
}

type StartPluginResp

type StartPluginResp struct {
	PluginInfo PluginInfo `json:"info"`
}

type StopAllPluginsArgs

type StopAllPluginsArgs struct {
	// Also stop the core
	IncludingCore bool `json:"includingCore,omitempty"`
}

type StopPluginArgs

type StopPluginArgs struct {
	Name string `json:"name"`
}

type StopPluginResp

type StopPluginResp struct {
	PluginInfo PluginInfo `json:"info"`
}

Jump to

Keyboard shortcuts

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