Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2021-11-02 16:43:32 +00:00
parent 114660a002
commit 8623e7fec8
4 changed files with 73 additions and 34 deletions

View File

@@ -0,0 +1,17 @@
package example
import (
"fmt"
"os"
"go.m3o.com/event"
)
// Consume events from a given topic.
func ConsumeFromAtopic() {
eventService := event.NewEventService(os.Getenv("M3O_API_TOKEN"))
rsp, err := eventService.Consume(&event.ConsumeRequest{
Topic: "user",
})
fmt.Println(rsp, err)
}