Versions in this module Expand all Collapse all v1 v1.20.76 Nov 28, 2023 Changes in this version + const BATCH_CHANNEL_SIZE + const DATE_FORMAT + const DEFAULT_BATCH_SIZE + const DEFAULT_CONSUMER_COUNT + const DEFAULT_PROD_BATCH_SIZE + const DEFAULT_PROD_TIME_OUT + const DEFAULT_TIME_OUT + const KEY_PATTERN + const LIB_NAME + const MAX_BATCH_SIZE + const MAX_PROD_BATCH_SIZE + const PROD_CHANNEL_SIZE + const SDK_VERSION + const TRACK + const TYPE_DATA + const TYPE_FLUSH + const USER_ADD + const USER_DEL + const USER_SET + const USER_SET_ONCE + const VALUE_MAX + func Track(eventName, accountId, distinctId string, data map[string]interface{}) + type BatchConsumer struct + Timeout time.Duration + func (c *BatchConsumer) Add(d Data) error + func (c *BatchConsumer) Close() error + func (c *BatchConsumer) Flush() error + type Consumer interface + Add func(d Data) error + Close func() error + Flush func() error + func GetProdBatchConsumer(serverUrl string, appId string, args ...int) Consumer + func NewBatchConsumer(serverUrl string, appId string) (Consumer, error) + func NewBatchConsumerWithBatchSize(serverUrl string, appId string, batchSize int) (Consumer, error) + func NewDebugConsumer(serverUrl string, appId string) (Consumer, error) + func NewLogConsumer(directory string, r RotateMode) (Consumer, error) + func NewLogConsumerWithFileSize(directory string, r RotateMode, size int) (Consumer, error) + type Data struct + AccountId string + DistinctId string + EventName string + Ip string + Properties map[string]interface{} + Time string + Type string + type DebugConsumer struct + func (c *DebugConsumer) Add(d Data) error + func (c *DebugConsumer) Close() error + func (c *DebugConsumer) Flush() error + type LogConsumer struct + func (c *LogConsumer) Add(d Data) error + func (c *LogConsumer) Close() error + func (c *LogConsumer) Flush() error + type ProdBatchConsumer struct + Timeout time.Duration + func (this *ProdBatchConsumer) Add(d Data) error + func (this *ProdBatchConsumer) Close() error + func (this *ProdBatchConsumer) Flush() error + type RotateMode int32 + const CHANNEL_SIZE + const ROTATE_DAILY + const ROTATE_HOURLY + type TDAnalytics struct + func GetTaAnalyst(args ...int) TDAnalytics + func New(c Consumer) TDAnalytics + func (ta *TDAnalytics) ClearSuperProperties() + func (ta *TDAnalytics) Close() + func (ta *TDAnalytics) Flush() + func (ta *TDAnalytics) GetSuperProperties() map[string]interface{} + func (ta *TDAnalytics) SetSuperProperties(superProperties map[string]interface{}) + func (ta *TDAnalytics) Track(accountId string, distinctId string, eventName string, ...) error + func (ta *TDAnalytics) UserAdd(accountId string, distinctId string, properties map[string]interface{}) error + func (ta *TDAnalytics) UserDelete(accountId string, distinctId string) error + func (ta *TDAnalytics) UserSet(accountId string, distinctId string, properties map[string]interface{}) error + func (ta *TDAnalytics) UserSetOnce(accountId string, distinctId string, properties map[string]interface{}) error