Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OutStats ¶
type OutStats struct {
sync.Mutex
Map map[string]*OutboundHandlerStats
// contains filtered or unexported fields
}
func NewOutStats ¶
func NewOutStats() *OutStats
func (*OutStats) Get ¶
func (o *OutStats) Get(tag string) *OutboundHandlerStats
func (*OutStats) IsHandlerActive ¶
type OutboundHandlerStats ¶
type OutboundHandlerStats struct {
UpCounter atomic.Uint64
DownCounter atomic.Uint64
// The time when the up/down counter is reset
Interval atomic.Value
Throughput atomic.Uint64
Ping atomic.Uint64
// The time when this handler is selected to handle
Time atomic.Value
// The time when there is response traffic from this handler
ActiveTime atomic.Value //time.Time
}
func NewHandlerStats ¶
func NewHandlerStats(throughput uint64, ping uint64) *OutboundHandlerStats
func (*OutboundHandlerStats) AddPing ¶
func (s *OutboundHandlerStats) AddPing(v uint64)
func (*OutboundHandlerStats) AddThroughput ¶
func (s *OutboundHandlerStats) AddThroughput(v uint64)
Click to show internal directories.
Click to hide internal directories.