New daemon architecture
This commit is contained in:
22
internal/ipc/protocol.go
Normal file
22
internal/ipc/protocol.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package ipc
|
||||
|
||||
// JSONL request/response protocol shared by bleh and blehd.
|
||||
|
||||
type Request struct {
|
||||
ID string `json:"id"`
|
||||
Method string `json:"method"`
|
||||
Params map[string]any `json:"params,omitempty"`
|
||||
}
|
||||
|
||||
type Error struct {
|
||||
Code string `json:"code"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
type Response struct {
|
||||
ID string `json:"id,omitempty"`
|
||||
OK bool `json:"ok"`
|
||||
Result any `json:"result,omitempty"`
|
||||
Error *Error `json:"error,omitempty"`
|
||||
Event string `json:"event,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user