Documentation
¶
Index ¶
Constants ¶
View Source
const ProtocolVersion = 1
ProtocolVersion is the current IPC protocol version
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Daemon ¶
type Daemon struct {
// contains filtered or unexported fields
}
Daemon manages the touchlog daemon lifecycle
type Message ¶
type Message struct {
Version int `json:"version"`
Type MessageType `json:"type"`
Payload json.RawMessage `json:"payload,omitempty"`
}
Message represents an IPC message
func NewMessage ¶
func NewMessage(msgType MessageType, payload interface{}) (*Message, error)
NewMessage creates a new message
type MessageType ¶
type MessageType string
MessageType represents the type of IPC message
const ( MessageTypeStatus MessageType = "Status" MessageTypeQueryExecute MessageType = "QueryExecute" MessageTypeReindexPaths MessageType = "ReindexPaths" MessageTypeShutdown MessageType = "Shutdown" )
type QueryExecuteRequest ¶
type QueryExecuteRequest struct {
Query string `json:"query"`
}
QueryExecuteRequest represents a query execution request
type QueryExecuteResponse ¶
type QueryExecuteResponse struct {
Results interface{} `json:"results"`
}
QueryExecuteResponse represents a query execution response
type ReindexPathsRequest ¶
type ReindexPathsRequest struct {
Paths []string `json:"paths"`
}
ReindexPathsRequest represents a reindex paths request
type ReindexPathsResponse ¶
type ReindexPathsResponse struct {
Processed int `json:"processed"`
}
ReindexPathsResponse represents a reindex paths response
type Response ¶
type Response struct {
Version int `json:"version"`
Success bool `json:"success"`
Error string `json:"error,omitempty"`
Data interface{} `json:"data,omitempty"`
}
Response represents an IPC response
func NewResponse ¶
NewResponse creates a new response
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server handles IPC communication via Unix domain socket
type StatusResponse ¶
StatusResponse represents a status response
Click to show internal directories.
Click to hide internal directories.