Skip to content

3.5.0

Compare
Choose a tag to compare
@velppa velppa released this 05 Apr 10:22
· 37 commits to master since this release
22a8b9e

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()
}