Highly-opinionated (ex-bullshit-free) MTPROTO proxy for Telegram. If you use v1.0 or upgrade broke you proxy, please read the chapter Version 2
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

stream_info.go 389B

1234567891011121314151617181920212223
  1. package stats
  2. import statsd "github.com/smira/go-statsd"
  3. type streamInfo map[string]string
  4. func (s streamInfo) T(key string) statsd.Tag {
  5. return statsd.StringTag(key, s[key])
  6. }
  7. func (s streamInfo) Reset() {
  8. for k := range s {
  9. delete(s, k)
  10. }
  11. }
  12. func getDirection(isRead bool) string {
  13. if isRead { // for telegram
  14. return TagDirectionToClient
  15. }
  16. return TagDirectionFromClient
  17. }