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
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

noop.go 949B

123456789101112131415161718192021222324252627282930
  1. package events
  2. import (
  3. "context"
  4. "github.com/9seconds/mtg/v2/mtglib"
  5. )
  6. type noop struct{}
  7. func (n noop) Send(ctx context.Context, evt mtglib.Event) {}
  8. func (n noop) Shutdown() {}
  9. func NewNoopStream() mtglib.EventStream {
  10. return noop{}
  11. }
  12. type noopObserver struct{}
  13. func (n noopObserver) EventStart(_ mtglib.EventStart) {}
  14. func (n noopObserver) EventConnectedToDC(_ mtglib.EventConnectedToDC) {}
  15. func (n noopObserver) EventTraffic(_ mtglib.EventTraffic) {}
  16. func (n noopObserver) EventFinish(_ mtglib.EventFinish) {}
  17. func (n noopObserver) EventConcurrencyLimited(_ mtglib.EventConcurrencyLimited) {}
  18. func (n noopObserver) EventIPBlocklisted(_ mtglib.EventIPBlocklisted) {}
  19. func (n noopObserver) Shutdown() {}
  20. func NewNoopObserver() Observer {
  21. return noopObserver{}
  22. }