Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadMessage ¶
ReadMessage reads a length-prefixed JSON message and decodes it into dst.
func WriteMessage ¶
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 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"`
}