update #4

Merged
milano15662 merged 1 commits from develop into master 2022-03-23 03:05:51 +00:00
3 changed files with 9 additions and 2 deletions
Showing only changes of commit fd4ed3187c - Show all commits

View File

@ -12,6 +12,7 @@ type Client struct {
Config Config
natsServer natsio.Server
natsJetStream natsio.JetStream
Pull Pull
}
var (

View File

@ -1,7 +1,8 @@
package appier
const (
SubjectRequestProductUpsert = "selly.request.product.upsert"
SubjectPingPullService = "selly.pull.ping"
SubjectPullProductUpsert = "selly.pull.product.upsert"
)
const (

View File

@ -5,5 +5,10 @@ type Pull struct{}
// ProductUpsert ...
func (Pull) ProductUpsert(payload Payload) (bool, error) {
return publishWithJetStream(JetStreamAppierService, SubjectRequestProductUpsert, toBytes(payload))
return publishWithJetStream(JetStreamAppierService, SubjectPullProductUpsert, payload.Data)
}
// PingService ...
func (Pull) PingService(payload Payload) (bool, error) {
return publishWithJetStream(JetStreamAppierService, SubjectPingPullService, payload.Data)
}