refactor: optimized code

This commit is contained in:
Marvin Zhang
2024-11-24 23:14:26 +08:00
parent 9281f44853
commit 601db5a567
6 changed files with 108 additions and 57 deletions

8
core/entity/ipc.go Normal file
View File

@@ -0,0 +1,8 @@
package entity
// IPCMessage defines the structure for messages exchanged between parent and child processes
type IPCMessage struct {
Type string `json:"type"` // message type identifier
Payload interface{} `json:"payload"` // message content
IPC bool `json:"ipc"` // Add this field to explicitly mark IPC messages
}