keen

package
v0.0.0-...-8510750 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// Capacity of log channel. Defaults to 1000.
	PendingWorkCapacity uint

	// Maximum number of items in a batch. Defaults to 50.
	MaxBatchSize uint

	// Amount of time after which to send a pending batch. Defaults to 10ms.
	BatchTimeout time.Duration

	ProjectId  string
	APIKey     string
	HttpClient *http.Client
	// contains filtered or unexported fields
}

func FromEnv

func FromEnv() *Client

func New

func New(project_id, api_key string) *Client

func (*Client) Stop

func (c *Client) Stop() error

Stop and gracefully wait for the background worker to finish processing pending requests.

func (*Client) Track

func (c *Client) Track(cn string, data EventType) error

func (*Client) TrackWithTimestamp

func (c *Client) TrackWithTimestamp(cn string, t time.Time, data EventType) error

type Event

type Event struct {
	Keen *keenProps `json:"keen"`
}

func (*Event) SetTimestamp

func (evt *Event) SetTimestamp(t time.Time)

type EventType

type EventType interface {
	SetTimestamp(time.Time)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL