remove broken examples

This commit is contained in:
Asim Aslam
2021-11-18 08:32:29 +00:00
parent 3760aaf9dd
commit 45d3c6a791
2 changed files with 0 additions and 39 deletions

View File

@@ -1,22 +0,0 @@
package main
import (
"fmt"
"os"
"go.m3o.com/stream"
)
// Publish a message to the stream. Specify a topic to group messages for a specific topic.
func main() {
streamService := stream.NewStreamService(os.Getenv("M3O_API_TOKEN"))
rsp, err := streamService.Publish(&stream.PublishRequest{
Message: map[string]interface{}{
"id": "1",
"type": "signup",
"user": "john",
},
Topic: "events",
})
fmt.Println(rsp, err)
}

View File

@@ -1,17 +0,0 @@
package main
import (
"fmt"
"os"
"go.m3o.com/stream"
)
// Subscribe to messages for a given topic.
func main() {
streamService := stream.NewStreamService(os.Getenv("M3O_API_TOKEN"))
rsp, err := streamService.Subscribe(&stream.SubscribeRequest{
Topic: "events",
})
fmt.Println(rsp, err)
}