3.5.0
Adds S3 Transport support - the client uploads events directly to S3.
Usage examples:
package main
import "github.com/FindHotel/analytics-go"
func main() {
client, err := analytics.NewS3ClientWithConfig(analytics.S3ClientConfig{
Config: analytics.Config{},
S3: analytics.S3{
Stage: "dev",
Stream: "tuna",
},
},
})
if err != nil { // ALWAYS check for errors!
panic(err)
}
// This will go to tuna stream
client.Enqueue(analytics.Track{
UserId: "test-user",
Event: "OfferFound",
})
// Flushes any queued messages and closes the client - DON'T forget this step.
tunaClient.Close()
}