emersion / go-imap-idle

IDLE extension for go-imap
MIT License
34 stars 12 forks source link

go-imap v2: Add IdleBackend #15

Open foxcpp opened 4 years ago

foxcpp commented 4 years ago

With go-imap v2 backend changes, updates are no longer sent directly but instead may be held back before command is sent.

IDLE is special in this case as it allows updates to be sent immediately but in current implementation backend does not know it can do so.

Something like that will work just fine I suppose:

type IdleBackend interface {
  Idle(done <-chan struct{})
}