ipc

package
v0.3.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadMessage

func ReadMessage(r io.Reader, dst interface{}) error

ReadMessage reads a length-prefixed JSON message and decodes it into dst.

func WriteMessage

func WriteMessage(w io.Writer, msg interface{}) error

WriteMessage encodes msg as JSON and writes it with a 4-byte big-endian length prefix.

Types

type AttachPayload

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

type DetachPayload

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

type ListResponsePayload

type ListResponsePayload struct {
	Services []ServiceInfo `json:"services"`
}

type RemovePayload

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

type Request

type Request struct {
	Type    string          `json:"type"`
	Payload json.RawMessage `json:"payload"`
}

Request is the envelope for all CLI→daemon requests.

type Response

type Response struct {
	OK      bool            `json:"ok"`
	Payload json.RawMessage `json:"payload,omitempty"`
	Error   string          `json:"error,omitempty"`
	EOF     bool            `json:"eof,omitempty"`
}

Response is the envelope for all daemon→CLI responses.

type ServiceInfo

type ServiceInfo struct {
	Name      string  `json:"name"`
	Group     string  `json:"group"`
	State     string  `json:"state"`
	PID       *int    `json:"pid"`
	Port      *int    `json:"port"`
	UptimeSec int64   `json:"uptime_s"`
	CPUPct    float64 `json:"cpu_pct"`
	MemBytes  int64   `json:"mem_bytes"`
}

type StartPayload

type StartPayload struct {
	Name   string                `json:"name"`
	Config *config.ServiceConfig `json:"config,omitempty"`
}

StartPayload names the service to start. Config, when set, carries the full service definition inline (used for project devrun.yaml services that are not in the global registry); when nil the daemon resolves Name from the registry.

type StartResponsePayload

type StartResponsePayload struct {
	PID int `json:"pid"`
}

type StopPayload

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

Jump to

Keyboard shortcuts

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