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 символов.

123456789101112131415161718192021222324252627
  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) Shutdown() {}
  17. func NewNoopObserver() Observer {
  18. return noopObserver{}
  19. }