Keen.io in Go
go get github.com/gokeen/keen
gopkg.in
go get gopkg.in/gokeen/keen.v1
k := keen.NewClient("aprojectid", func(c *keen.KeenClient) {
c.WriteKey = "awritekey"
})
err := k.Write(MyEvent{
Action: "Wrote to Keen",
Time: time.Now(),
})
if err != nil {
// handle error
}
BYO-Event struct by implementing the Event
interface.
type MyEvent struct{
Action string `json:"action"`
Time time.Time `json:"time"`
}
func (MyEvent) CollectionName() string {
return "awesome-events"
}
MIT