Skip to content

koding/eventexporter

Repository files navigation

eventexporter Build Status

eventexporter is a library to export events to 3rd party services.

Usage

key := "segment api token"
size := "size of events to accumulate before flushing"

event := &eventexporter.Event{
  Name: "test event",
  User: &eventexporter.User{
    Username:"indianajones", Email: "[email protected]"
  },
  Body: &eventexporter.Body{Content: "Hello world"},
  Properties: map[string]interface{}{"occupation" : "explorer" },
}

client := eventexporter.NewSegementIOExporter(key, size)
client.Send(event)

FakeExporter is an implementation of Exporter to be used in tests.

import (
  "github.com/koding/eventexporter"
)

event := &eventexporter.Event{Name: "test event"}

client := eventexporter.NewFakeExporter()
client.Send(event)

fmt.Println(client.Events)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages