FILE / ScuroNeko/mtg

stats/interfaces.go

Исходный файл и его история в репозитории.
FILE c62afbdfd81a34e11654209d4574a241636ed45f
Files
mtg/stats/interfaces.go
T
2019-10-08 11:55:57 +03:00

51 lines
955 B
Go

package stats
import (
"net"
"github.com/9seconds/mtg/conntypes"
)
type IngressTrafficInterface interface {
IngressTraffic(int)
}
type EgressTrafficInterface interface {
EgressTraffic(int)
}
type ClientConnectedInterface interface {
ClientConnected(conntypes.ConnectionType, *net.TCPAddr)
}
type ClientDisconnectedInterface interface {
ClientDisconnected(conntypes.ConnectionType, *net.TCPAddr)
}
type TelegramConnectedInterface interface {
TelegramConnected(conntypes.DC, *net.TCPAddr)
}
type TelegramDisconnectedInterface interface {
TelegramDisconnected(conntypes.DC, *net.TCPAddr)
}
type CrashInterface interface {
Crash()
}
type AntiReplayDetectedInterface interface {
AntiReplayDetected()
}
type Interface interface {
IngressTrafficInterface
EgressTrafficInterface
ClientConnectedInterface
ClientDisconnectedInterface
TelegramConnectedInterface
TelegramDisconnectedInterface
CrashInterface
AntiReplayDetectedInterface
}