mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-21 15:05:01 +00:00
Commit from GitHub Actions (Generate Clients & Examples)
This commit is contained in:
@@ -16,7 +16,7 @@ type EventService struct {
|
|||||||
client *client.Client
|
client *client.Client
|
||||||
}
|
}
|
||||||
|
|
||||||
// Publish a message to the event. Specify a topic to group messages for a specific topic.
|
// Publish a message to the event stream.
|
||||||
func (t *EventService) Publish(request *PublishRequest) (*PublishResponse, error) {
|
func (t *EventService) Publish(request *PublishRequest) (*PublishResponse, error) {
|
||||||
rsp := &PublishResponse{}
|
rsp := &PublishResponse{}
|
||||||
return rsp, t.client.Call("event", "Publish", request, rsp)
|
return rsp, t.client.Call("event", "Publish", request, rsp)
|
||||||
|
|||||||
@@ -77,5 +77,5 @@
|
|||||||
"prepare": "npm run build"
|
"prepare": "npm run build"
|
||||||
},
|
},
|
||||||
"types": "index.d.ts",
|
"types": "index.d.ts",
|
||||||
"version": "1.0.610"
|
"version": "1.0.611"
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"github.com/micro/services/clients/go/event"
|
"github.com/micro/services/clients/go/event"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Publish a message to the event. Specify a topic to group messages for a specific topic.
|
// Publish a message to the event stream.
|
||||||
func PublishAmessage() {
|
func PublishAmessage() {
|
||||||
eventService := event.NewEventService(os.Getenv("MICRO_API_TOKEN"))
|
eventService := event.NewEventService(os.Getenv("MICRO_API_TOKEN"))
|
||||||
rsp, err := eventService.Publish(&event.PublishRequest{
|
rsp, err := eventService.Publish(&event.PublishRequest{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
const { EventService } = require("m3o/event");
|
const { EventService } = require("m3o/event");
|
||||||
|
|
||||||
// Publish a message to the event. Specify a topic to group messages for a specific topic.
|
// Publish a message to the event stream.
|
||||||
async function publishAmessage() {
|
async function publishAmessage() {
|
||||||
let eventService = new EventService(process.env.MICRO_API_TOKEN);
|
let eventService = new EventService(process.env.MICRO_API_TOKEN);
|
||||||
let rsp = await eventService.publish({
|
let rsp = await eventService.publish({
|
||||||
|
|||||||
Reference in New Issue
Block a user