order-warning #155
|
@ -19,3 +19,9 @@ func (s Socket) EmitSocketEventDataReward(p model.PayloadEmitSocketEvent) error
|
|||
_, err := natsio.GetServer().Request(subject.Socket.EmitEventReward, toBytes(p))
|
||||
return err
|
||||
}
|
||||
|
||||
// EmitEventToUser ...
|
||||
func (s Socket) EmitEventToUser(p model.PayloadEmitSocketEvent) error {
|
||||
_, err := natsio.GetServer().Request(subject.Socket.EmitEventToUser, toBytes(p))
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -9,6 +9,8 @@ func getSocketValue(val string) string {
|
|||
// Socket ...
|
||||
var Socket = struct {
|
||||
EmitEventReward string
|
||||
EmitEventToUser string
|
||||
}{
|
||||
EmitEventReward: getSocketValue("emit_event_reward"),
|
||||
EmitEventToUser: "send_message_to_socket",
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue