mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-14 03:54:47 +00:00
Commit from GitHub Actions (Generate Clients & Examples)
This commit is contained in:
@@ -12,9 +12,9 @@ func PublishAnEvent() {
|
||||
eventService := event.NewEventService(os.Getenv("MICRO_API_TOKEN"))
|
||||
rsp, err := eventService.Publish(&event.PublishRequest{
|
||||
Message: map[string]interface{}{
|
||||
"id": "1",
|
||||
"type": "signup",
|
||||
"user": "john",
|
||||
"id": "1",
|
||||
},
|
||||
Topic: "user",
|
||||
})
|
||||
|
||||
@@ -12,9 +12,9 @@ func PublishAmessage() {
|
||||
mqService := mq.NewMqService(os.Getenv("MICRO_API_TOKEN"))
|
||||
rsp, err := mqService.Publish(&mq.PublishRequest{
|
||||
Message: map[string]interface{}{
|
||||
"type": "signup",
|
||||
"user": "john",
|
||||
"id": "1",
|
||||
"type": "signup",
|
||||
},
|
||||
Topic: "events",
|
||||
})
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"github.com/micro/services/clients/go/stream"
|
||||
)
|
||||
|
||||
// SendMessage a message to the stream.
|
||||
// Send a message to the stream.
|
||||
func SendMessage() {
|
||||
streamService := stream.NewStreamService(os.Getenv("MICRO_API_TOKEN"))
|
||||
rsp, err := streamService.SendMessage(&stream.SendMessageRequest{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const { StreamService } = require("m3o/stream");
|
||||
|
||||
// SendMessage a message to the stream.
|
||||
// Send a message to the stream.
|
||||
async function sendMessage() {
|
||||
let streamService = new StreamService(process.env.MICRO_API_TOKEN);
|
||||
let rsp = await streamService.sendMessage({
|
||||
|
||||
Reference in New Issue
Block a user