mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
Commit from GitHub Actions (Generate Clients & Examples)
This commit is contained in:
@@ -28,7 +28,7 @@ func (t *StreamService) ListMessages(request *ListMessagesRequest) (*ListMessage
|
||||
return rsp, t.client.Call("stream", "ListMessages", request, rsp)
|
||||
}
|
||||
|
||||
// SendMessage a message to the stream.
|
||||
// Send a message to the stream.
|
||||
func (t *StreamService) SendMessage(request *SendMessageRequest) (*SendMessageResponse, error) {
|
||||
rsp := &SendMessageResponse{}
|
||||
return rsp, t.client.Call("stream", "SendMessage", request, rsp)
|
||||
|
||||
@@ -78,5 +78,5 @@
|
||||
"prepare": "npm run build"
|
||||
},
|
||||
"types": "index.d.ts",
|
||||
"version": "1.0.619"
|
||||
"version": "1.0.620"
|
||||
}
|
||||
@@ -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