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.

12345678910111213141516171819202122232425262728293031
  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 NewNoopStream() mtglib.EventStream {
  9. return noop{}
  10. }
  11. type noopObserver struct{}
  12. func (n noopObserver) EventStart(_ mtglib.EventStart) {}
  13. func (n noopObserver) EventConnectedToDC(_ mtglib.EventConnectedToDC) {}
  14. func (n noopObserver) EventDomainFronting(_ mtglib.EventDomainFronting) {}
  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) EventReplayAttack(_ mtglib.EventReplayAttack) {}
  20. func (n noopObserver) Shutdown() {}
  21. func NewNoopObserver() Observer {
  22. return noopObserver{}
  23. }