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
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

12345678910111213141516171819202122232425262728
  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) EventFinish(_ mtglib.EventFinish) {}
  15. func (n noopObserver) EventConcurrencyLimited(_ mtglib.EventConcurrencyLimited) {}
  16. func (n noopObserver) EventIPBlocklisted(_ mtglib.EventIPBlocklisted) {}
  17. func (n noopObserver) Shutdown() {}
  18. func NewNoopObserver() Observer {
  19. return noopObserver{}
  20. }