Documentation ¶
Index ¶
- func DeepCopy(value map[string]interface{}) map[string]interface{}
- type DataLog
- type DistinctType
- type Event
- type Exporter
- type Filter
- type FilterOption
- type Kafka
- type Logger
- type Metadata
- type Option
- func WithAppId(appId string) Option
- func WithBasePath(path string) Option
- func WithBatch(batch bool) Option
- func WithBatchBulkSizeMax(size int) Option
- func WithBrokers(brokers []string) Option
- func WithDebug(debug bool) Option
- func WithEncoderConfig(encoderConfig zapcore.EncoderConfig) Option
- func WithLogDisable(disable bool) Option
- func WithMetadata(md map[string]string) Option
- func WithProjectName(projectName string) Option
- func WithServiceName(serviceName string) Option
- func WithTimeout(timeout int) Option
- func WithToken(token string) Option
- type OptionFunc
- type SensorsData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DataLog ¶
type Event ¶
type Event struct { Name string // 事件名称 DistinctId string // 唯一标识 ID; 用户UID, 或者游客ID DistinctType DistinctType // 唯一标识类型:(0-访客,1-用户) Time time.Time // 事件时间 }
type Exporter ¶
type Exporter interface { Write(ctx context.Context, event *Event, metadata Metadata) error Flush() error Close() error }
Exporter 导出器
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
Filter is a logger filter.
func NewFilter ¶
func NewFilter(exporter Exporter, opts ...FilterOption) *Filter
NewFilter new a logger filter.
type FilterOption ¶
type FilterOption func(*Filter)
FilterOption is filter option.
func FilterFunc ¶
FilterFunc with filter func.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithBatchBulkSizeMax ¶
func WithBrokers ¶
func WithEncoderConfig ¶
func WithEncoderConfig(encoderConfig zapcore.EncoderConfig) Option
WithEncoderConfig set logger encoderConfig
func WithMetadata ¶
WithMetadata set default fields for the logger
func WithProjectName ¶
func WithServiceName ¶
func WithTimeout ¶
type OptionFunc ¶
type OptionFunc func(*config)
type SensorsData ¶
type SensorsData struct {
// contains filtered or unexported fields
}
func NewSensorsData ¶
func NewSensorsData(opts *config) *SensorsData
Source Files ¶
Click to show internal directories.
Click to hide internal directories.