kittenipc/lib/golang/protocol.go
2026-03-28 14:33:46 +03:00

24 lines
440 B
Go

package golang
const ipcSocketArg = "--ipc-socket"
const maxMessageLength = 1 << 30 // 1 GB
const defaultAcceptTimeout = 10 // seconds
type MsgType int
type Vals []any
const (
MsgCall MsgType = 1
MsgResponse MsgType = 2
)
type Message struct {
Type MsgType `json:"type"`
Id int64 `json:"id"`
Method string `json:"method"`
Args Vals `json:"args"`
Result Vals `json:"result"`
Error string `json:"error"`
}