Files
ragflow/internal/common/status_message.go
Jin Hai 7f6a9e8ee9 Update ext field type of heartbeat message (#13490)
### What problem does this PR solve?

As title

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
2026-03-10 10:49:39 +08:00

34 lines
865 B
Go

package common
import (
"time"
)
type MessageType string
const (
MessageHeartbeat MessageType = "heartbeat"
MessageMetric MessageType = "metric"
MessageEvent MessageType = "event"
)
type ServerType string
const (
ServerTypeAPI ServerType = "api_server" // API server
ServerTypeWorker ServerType = "ingestor" // Ingestion server
ServerTypeScheduler ServerType = "data_collector" // Data collection server
)
type BaseMessage struct {
MessageID int64 `json:"report_id"`
MessageType MessageType `json:"report_type"`
ServerName string `json:"server_id"`
ServerType ServerType `json:"server_type"`
Host string `json:"host"`
Port int `json:"port"`
Version string `json:"version"`
Timestamp time.Time `json:"timestamp"`
Ext interface{} `json:"ext,omitempty"`
}