mirror of
https://github.com/openziti/ziti.git
synced 2026-10-13 15:51:21 +00:00
27 lines
755 B
Go
27 lines
755 B
Go
package network
|
|
|
|
import "time"
|
|
|
|
type ServiceCounters interface {
|
|
ServiceDialSuccess(serviceId string)
|
|
ServiceDialFail(serviceId string)
|
|
ServiceDialTimeout(serviceId string)
|
|
ServiceDialOtherError(serviceId string)
|
|
}
|
|
|
|
func (network *Network) ServiceDialSuccess(serviceId string) {
|
|
network.serviceDialSuccessCounter.Update(serviceId, time.Now(), 1)
|
|
}
|
|
|
|
func (network *Network) ServiceDialFail(serviceId string) {
|
|
network.serviceDialFailCounter.Update(serviceId, time.Now(), 1)
|
|
}
|
|
|
|
func (network *Network) ServiceDialTimeout(serviceId string) {
|
|
network.serviceDialTimeoutCounter.Update(serviceId, time.Now(), 1)
|
|
}
|
|
|
|
func (network *Network) ServiceDialOtherError(serviceId string) {
|
|
network.serviceDialOtherErrorCounter.Update(serviceId, time.Now(), 1)
|
|
}
|