Documentation ¶
Index ¶
Constants ¶
View Source
const (
REDIS_KEEP_TTL = -1
)
Variables ¶
View Source
var (
GlobalJson jsoniter.API
)
Functions ¶
func RecordObserver ¶
func RecordObserver(record bool, statistics StatisticsRecord)
Observer Mode redis key is time,value is ping data
Types ¶
type StatisticsRecord ¶
type StatisticsRecord struct { PacketRecv int `json:"packet_recv"` PacketSent int `json:"packet_sent"` PacketLoss float64 `json:"packet_loss"` DestURL string `json:"desk_url"` IPAddr *net.IPAddr `json:"ip_addr"` MinRtt time.Duration `json:"min_rtt"` MaxRtt time.Duration `json:"max_rtt"` AvgRtt time.Duration `json:"avg_rtt"` StdDevRtt time.Duration `json:"std_dev_rtt"` TotalTime int64 `json:"total_time"` }
func (*StatisticsRecord) FormatOutput ¶
func (statis *StatisticsRecord) FormatOutput(url string)
Click to show internal directories.
Click to hide internal directories.