Documentation
¶
Index ¶
- type Client
- func (t *Client) Action(a *contexts.Action, opts ...event.Option)
- func (t *Client) Alias(alias *contexts.Alias, usr *contexts.User, opts ...event.Option)
- func (t *Client) Close()
- func (t *Client) Flush()
- func (t *Client) Group(g *contexts.Group, u *contexts.User, opts ...event.Option)
- func (t *Client) Identify(u *contexts.User, opts ...event.Option)
- func (t *Client) Page(page *contexts.Page, opts ...event.Option)
- func (t *Client) Queue(evt *event.Event)
- func (t *Client) Screen(screen *contexts.Screen, opts ...event.Option)
- func (t *Client) Session(sess *contexts.Session, opts ...event.Option)
- func (t *Client) SetGroup(grp *contexts.Group) *Client
- func (t *Client) SetOption(opt event.Option) *Client
- func (t *Client) SetUser(usr *contexts.User) *Client
- func (t *Client) Timing(te *contexts.Timing, opts ...event.Option)
- func (t *Client) TimingStart(cat, label, variable string) *timer
- func (t *Client) Track(evt string, opts ...event.Option)
- type Option
- func Bulk() Option
- func CollectorURL(u string) Option
- func Debug() Option
- func FlushCount(i int) Option
- func FlushInterval(d time.Duration) Option
- func MaxRetries(i int) Option
- func QueueBuffer(buf int) Option
- func S2S() Option
- func ServerKey(key string) Option
- func SetAppInfo(app *contexts.App) Option
- func Strict(b bool) Option
- func TrackingID(id string) Option
- func WithClientHeader(k, v string) Option
- type Options
- type Store
- type StoreEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) TimingStart ¶
type Option ¶
type Option func(*Options)
func CollectorURL ¶
func FlushCount ¶ added in v0.1.4
func FlushInterval ¶ added in v0.1.4
func MaxRetries ¶ added in v0.1.7
func QueueBuffer ¶ added in v0.1.4
func SetAppInfo ¶
func TrackingID ¶
func WithClientHeader ¶
type Options ¶
type Options struct {
CollectorURL string
ServerKey string
S2S bool
Bulk bool
ClientHeaders map[string]string
Debug bool
Strict bool
AppInfo *contexts.App
Platform string
TrackingID string
QueueBuffer int
FlushInterval time.Duration
FlushCount int
MaxRetries int
}
func (Options) EventOptions ¶
type Store ¶
type Store interface {
Set(*event.Event) error
Update(*StoreEvent) error
Remove(*StoreEvent) error
Get(string) (*StoreEvent, error)
GetAll() ([]*StoreEvent, error)
Count() int
}
func NewMemStore ¶
Click to show internal directories.
Click to hide internal directories.