status message from zmq socket

26 views
Skip to first unread message

Janak Thakkar

unread,
Sep 1, 2021, 4:15:03 AM9/1/21
to zeromq
Hello Team,

 How to open a zmq  SUB socket on this endpoint ipc:///*-events.socket That will aggregate and publish a status message from our core services (rate at 1Hz) of the following format (as go json struct):
type Status int const (
    FATAL Status = iota
    ERROR
    WARNING
    OKAY
)

type Event struct {
    Name      string        `json:"name"`
    Service   string        `json:"service"`
    Timestamp time.Time     `json:"timestamp"`
    Status    Status        `json:"status"`
    Uptime    time.Duration `json:"uptime"`
    Key       Key           `json:"key"`
    Message   string        `json:"message"`
}
Reply all
Reply to author
Forward
0 new messages