TODO: move subscription to package event Subscription represents an event subscription where events are delivered on a data channel.
| 34 | // Subscription represents an event subscription where events are |
| 35 | // delivered on a data channel. |
| 36 | type Subscription interface { |
| 37 | // Unsubscribe cancels the sending of events to the data channel |
| 38 | // and closes the error channel. |
| 39 | Unsubscribe() |
| 40 | // Err returns the subscription error channel. The error channel receives |
| 41 | // a value if there is an issue with the subscription (e.g. the network connection |
| 42 | // delivering the events has been closed). Only one value will ever be sent. |
| 43 | // The error channel is closed by Unsubscribe. |
| 44 | Err() <-chan error |
| 45 | } |
| 46 | |
| 47 | // ChainReader provides access to the blockchain. The methods in this interface access raw |
| 48 | // data from either the canonical chain (when requesting by block number) or any |
no outgoing calls
no test coverage detected