mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-14 12:04:41 +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{}{
|
||||
"user": "john",
|
||||
"id": "1",
|
||||
"type": "signup",
|
||||
"user": "john",
|
||||
},
|
||||
Topic: "user",
|
||||
})
|
||||
|
||||
@@ -2,5 +2,6 @@ curl "http://localhost:8080/helloworld/Stream" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer $MICRO_API_TOKEN" \
|
||||
-d '{
|
||||
"messages": 10,
|
||||
"name": "John"
|
||||
}'
|
||||
@@ -11,7 +11,8 @@ import (
|
||||
func StreamsResponsesFromTheServerUsingWebsockets() {
|
||||
helloworldService := helloworld.NewHelloworldService(os.Getenv("MICRO_API_TOKEN"))
|
||||
rsp, err := helloworldService.Stream(&helloworld.StreamRequest{
|
||||
Name: "John",
|
||||
Messages: 10,
|
||||
Name: "John",
|
||||
})
|
||||
fmt.Println(rsp, err)
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ const { HelloworldService } = require("m3o/helloworld");
|
||||
async function streamsResponsesFromTheServerUsingWebsockets() {
|
||||
let helloworldService = new HelloworldService(process.env.MICRO_API_TOKEN);
|
||||
let rsp = await helloworldService.stream({
|
||||
messages: 10,
|
||||
name: "John",
|
||||
});
|
||||
console.log(rsp);
|
||||
|
||||
@@ -12,9 +12,9 @@ func PublishAmessage() {
|
||||
mqService := mq.NewMqService(os.Getenv("MICRO_API_TOKEN"))
|
||||
rsp, err := mqService.Publish(&mq.PublishRequest{
|
||||
Message: map[string]interface{}{
|
||||
"id": "1",
|
||||
"type": "signup",
|
||||
"user": "john",
|
||||
"id": "1",
|
||||
},
|
||||
Topic: "events",
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user