The P interface represents the handle for a transport medium used for IMAP updates.
| 35 | // The P interface represents the handle for a transport medium used for IMAP |
| 36 | // updates. |
| 37 | type P interface { |
| 38 | // Listen starts the "pull" goroutine that reads updates from the pipe and |
| 39 | // sends them to the channel. |
| 40 | // |
| 41 | // Usually it is not possible to call Listen multiple times for the same |
| 42 | // pipe. |
| 43 | // |
| 44 | // Updates sent using the same UpdatePipe object using Push are not |
| 45 | // duplicates to the channel passed to Listen. |
| 46 | Listen(upds chan<- mess.Update) error |
| 47 | |
| 48 | // InitPush prepares the UpdatePipe to be used as updates source (Push |
| 49 | // method). |
| 50 | // |
| 51 | // It is called implicitly on the first Push call, but calling it |
| 52 | // explicitly allows to detect initialization errors early. |
| 53 | InitPush() error |
| 54 | |
| 55 | // Push writes the update to the pipe. |
| 56 | // |
| 57 | // The update will not be duplicated if the UpdatePipe is also listening |
| 58 | // for updates. |
| 59 | Push(upd mess.Update) error |
| 60 | |
| 61 | Close() error |
| 62 | } |
no outgoing calls
no test coverage detected