Skip to content

gokeen/keen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

keen

Build Status GoDoc

Keen.io in Go

Install

go get github.com/gokeen/keen

gopkg.in

go get gopkg.in/gokeen/keen.v1

Example

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"
}

License

MIT