Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2021-11-02 13:31:19 +00:00
parent d38b38c742
commit a8b7e20a0c
21 changed files with 767 additions and 607 deletions

View File

@@ -0,0 +1,17 @@
package example
import (
"fmt"
"os"
"go.m3o.com/event"
)
// Subscribe to messages for a given topic.
func SubscribeToAtopic() {
eventService := event.NewEventService(os.Getenv("M3O_API_TOKEN"))
rsp, err := eventService.Subscribe(&event.SubscribeRequest{
Topic: "user",
})
fmt.Println(rsp, err)
}