22 lines
466 B
Go
22 lines
466 B
Go
package client
|
|
|
|
import (
|
|
"git.selly.red/Selly-Modules/natsio"
|
|
"git.selly.red/Selly-Modules/natsio/model"
|
|
"git.selly.red/Selly-Modules/natsio/subject"
|
|
)
|
|
|
|
// Socket ...
|
|
type Socket struct{}
|
|
|
|
// GetSocket ...
|
|
func GetSocket() Socket {
|
|
return Socket{}
|
|
}
|
|
|
|
// EmitSocketEventDataReward ...
|
|
func (s Socket) EmitSocketEventDataReward(p model.PayloadEmitSocketEvent) error {
|
|
_, err := natsio.GetServer().Request(subject.Socket.EmitEventReward, toBytes(p))
|
|
return err
|
|
}
|