Documentation
¶
Index ¶
- Variables
- func Samples() error
- func SetDB(database database.Database)
- type ColumnIDInterfacer
- type Hit
- type Hitters
- func (h Hitters) Avg() int64
- func (h Hitters) Count() int
- func (h Hitters) Db() database.Database
- func (h Hitters) DeleteAll() error
- func (h Hitters) First() *Hit
- func (h Hitters) Last() *Hit
- func (h Hitters) LastAmount(amount int) []*Hit
- func (h Hitters) List() []*Hit
- func (h Hitters) Since(t time.Time) []*Hit
- func (h Hitters) Sum() int64
- type IntResult
Constants ¶
This section is empty.
Variables ¶
View Source
var SampleHits = 99900.
Functions ¶
Types ¶
type ColumnIDInterfacer ¶
type Hit ¶
type Hit struct {
Id int64 `gorm:"primary_key;column:id" json:"id"`
Service int64 `gorm:"index;column:service" json:"-"`
Latency int64 `gorm:"column:latency" json:"latency"`
PingTime int64 `gorm:"column:ping_time" json:"ping_time"`
CreatedAt time.Time `gorm:"column:created_at" json:"created_at"`
}
Hit struct is a 'successful' ping or web response entry for a service.
func (*Hit) AfterCreate ¶
func (h *Hit) AfterCreate()
func (*Hit) AfterDelete ¶
func (h *Hit) AfterDelete()
func (*Hit) AfterUpdate ¶
func (h *Hit) AfterUpdate()
func (*Hit) BeforeCreate ¶
BeforeCreate for Hit will set CreatedAt to UTC
type Hitters ¶
type Hitters struct {
// contains filtered or unexported fields
}
func AllHits ¶
func AllHits(obj ColumnIDInterfacer) Hitters
func (Hitters) LastAmount ¶
Click to show internal directories.
Click to hide internal directories.