Documentation
¶
Index ¶
- Constants
- func MicroTime(timer time.Time) float64
- type CacheDataSource
- type CacheLoggerDataSourceInterface
- type CacheLoggerInterface
- type CommandLoggerDataSourceInterface
- type CommandLoggerInterface
- type DataBuffer
- type DataSource
- type DatabaseDataSource
- type LoggerDataSource
- func (source *LoggerDataSource) LogDebugMap(name string, debugData map[string]string)
- func (source *LoggerDataSource) LogDebugSlice(name string, debugData []string)
- func (source *LoggerDataSource) LogDebugString(name string, debugData string)
- func (source *LoggerDataSource) Resolve(dataBuffer *DataBuffer)
- type LoggerDataSourceInterface
- type LoggerInterface
- type QueryLoggerDataSourceInterface
- type QueryLoggerInterface
- type RedisDataSource
- type RequestLoggerDataSourceInterface
- type RequestLoggerInterface
- type RequestResponseDataSource
- func (source *RequestResponseDataSource) EndMemoryUsage()
- func (source *RequestResponseDataSource) Resolve(dataBuffer *DataBuffer)
- func (source *RequestResponseDataSource) SetController(controller string, method string)
- func (source *RequestResponseDataSource) SetMiddleware(middleware []string)
- func (source *RequestResponseDataSource) SetResponseStatus(responseStatus int16)
- func (source *RequestResponseDataSource) SetResponseTime(responseTime time.Time)
- func (source *RequestResponseDataSource) SetStartTime(start time.Time)
- func (source *RequestResponseDataSource) StartMemoryUsage()
- type TimelineDataSource
- type TimelineLoggerDataSourceInterface
- type TimelineLoggerInterface
- type UserDataDataSource
- type UserDataInterface
- type UserDataSourceInterface
Constants ¶
View Source
const ( CacheHit = "hit" CacheWrite = "write" CacheDelete = "delete" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CacheDataSource ¶
type CacheDataSource struct {
// contains filtered or unexported fields
}
func (*CacheDataSource) LogCache ¶
func (source *CacheDataSource) LogCache(connection, typeParam, action, key, value string, duration, expiration float32)
func (*CacheDataSource) LogCacheMiss ¶
func (source *CacheDataSource) LogCacheMiss(connection, action, key, value string, misses int, duration, expiration float32)
func (*CacheDataSource) Resolve ¶
func (source *CacheDataSource) Resolve(dataBuffer *DataBuffer)
type CacheLoggerDataSourceInterface ¶
type CacheLoggerDataSourceInterface interface {
DataSource
CacheLoggerInterface
}
type CacheLoggerInterface ¶
type CommandLoggerDataSourceInterface ¶
type CommandLoggerDataSourceInterface interface {
DataSource
CommandLoggerInterface
}
type CommandLoggerInterface ¶
type DataBuffer ¶
type DataBuffer struct {
Log []interface{} `json:"log"`
DatabaseQueries []interface{} `json:"databaseQueries"`
DatabaseQueriesCount int `json:"databaseQueriesCount"`
DatabaseDuration float32 `json:"databaseDuration"`
RedisCommands []interface{} `json:"redisCommands"`
CacheQueries []interface{} `json:"cacheQueries"`
CacheTime float32 `json:"cacheTime"`
CacheDeletes int16 `json:"cacheDeletes"`
CacheWrites int16 `json:"cacheWrites"`
CacheReads int16 `json:"cacheReads"`
CacheHits int16 `json:"cacheHits"`
TimelineData map[string]interface{} `json:"timelineData"`
Time float64 `json:"time"`
Controller string `json:"controller"`
Middleware []string `json:"middleware"`
MemoryUsage uint64 `json:"memoryUsage"`
ResponseTime float64 `json:"responseTime"`
ResponseDuration float64 `json:"responseDuration"`
ResponseStatus int16 `json:"responseStatus"`
UserData []map[string]interface{} `json:"userData"`
}
type DataSource ¶
type DataSource interface {
Resolve(dataBuffer *DataBuffer)
}
type DatabaseDataSource ¶
type DatabaseDataSource struct {
// contains filtered or unexported fields
}
func (*DatabaseDataSource) LogQuery ¶
func (source *DatabaseDataSource) LogQuery(model, query string, duration float32, bind []interface{})
func (*DatabaseDataSource) Resolve ¶
func (source *DatabaseDataSource) Resolve(dataBuffer *DataBuffer)
type LoggerDataSource ¶
type LoggerDataSource struct {
// contains filtered or unexported fields
}
func (*LoggerDataSource) LogDebugMap ¶
func (source *LoggerDataSource) LogDebugMap(name string, debugData map[string]string)
func (*LoggerDataSource) LogDebugSlice ¶
func (source *LoggerDataSource) LogDebugSlice(name string, debugData []string)
func (*LoggerDataSource) LogDebugString ¶
func (source *LoggerDataSource) LogDebugString(name string, debugData string)
func (*LoggerDataSource) Resolve ¶
func (source *LoggerDataSource) Resolve(dataBuffer *DataBuffer)
type LoggerDataSourceInterface ¶
type LoggerDataSourceInterface interface {
DataSource
LoggerInterface
}
type LoggerInterface ¶
type QueryLoggerDataSourceInterface ¶
type QueryLoggerDataSourceInterface interface {
DataSource
QueryLoggerInterface
}
type QueryLoggerInterface ¶
type RedisDataSource ¶
type RedisDataSource struct {
// contains filtered or unexported fields
}
func (*RedisDataSource) LogCommand ¶
func (source *RedisDataSource) LogCommand(command string, key string, duration float32)
func (*RedisDataSource) Resolve ¶
func (source *RedisDataSource) Resolve(dataBuffer *DataBuffer)
type RequestLoggerDataSourceInterface ¶
type RequestLoggerDataSourceInterface interface {
DataSource
RequestLoggerInterface
}
type RequestLoggerInterface ¶
type RequestResponseDataSource ¶
type RequestResponseDataSource struct {
// contains filtered or unexported fields
}
func (*RequestResponseDataSource) EndMemoryUsage ¶
func (source *RequestResponseDataSource) EndMemoryUsage()
func (*RequestResponseDataSource) Resolve ¶
func (source *RequestResponseDataSource) Resolve(dataBuffer *DataBuffer)
func (*RequestResponseDataSource) SetController ¶
func (source *RequestResponseDataSource) SetController(controller string, method string)
func (*RequestResponseDataSource) SetMiddleware ¶
func (source *RequestResponseDataSource) SetMiddleware(middleware []string)
func (*RequestResponseDataSource) SetResponseStatus ¶
func (source *RequestResponseDataSource) SetResponseStatus(responseStatus int16)
func (*RequestResponseDataSource) SetResponseTime ¶
func (source *RequestResponseDataSource) SetResponseTime(responseTime time.Time)
func (*RequestResponseDataSource) SetStartTime ¶
func (source *RequestResponseDataSource) SetStartTime(start time.Time)
func (*RequestResponseDataSource) StartMemoryUsage ¶
func (source *RequestResponseDataSource) StartMemoryUsage()
type TimelineDataSource ¶
type TimelineDataSource struct {
// contains filtered or unexported fields
}
func (*TimelineDataSource) EndEvent ¶
func (source *TimelineDataSource) EndEvent(event string)
func (*TimelineDataSource) Resolve ¶
func (source *TimelineDataSource) Resolve(dataBuffer *DataBuffer)
func (*TimelineDataSource) StartEvent ¶
func (source *TimelineDataSource) StartEvent(event string, description string)
type TimelineLoggerDataSourceInterface ¶
type TimelineLoggerDataSourceInterface interface {
DataSource
TimelineLoggerInterface
}
type TimelineLoggerInterface ¶
type UserDataDataSource ¶
type UserDataDataSource struct {
Title string `json:"title"`
Data []map[string]interface{} `json:"data"`
ShowAs string `json:"showAs"` // Present data as "counters" or "table"
// contains filtered or unexported fields
}
func (*UserDataDataSource) LogTable ¶
func (source *UserDataDataSource) LogTable(data map[string]interface{}, title string, labels map[string]string)
LogTable labels: Map of human-readable labels for the data contents showAs: Describes how the data should be presented ("counters" or "table")
func (*UserDataDataSource) Resolve ¶
func (source *UserDataDataSource) Resolve(dataBuffer *DataBuffer)
func (*UserDataDataSource) SetShowAs ¶
func (source *UserDataDataSource) SetShowAs(showAs string)
func (*UserDataDataSource) SetTitle ¶
func (source *UserDataDataSource) SetTitle(title string)
type UserDataInterface ¶
type UserDataSourceInterface ¶
type UserDataSourceInterface interface {
DataSource
UserDataInterface
}
Click to show internal directories.
Click to hide internal directories.